2008-03-21 23:50:01

by Chris Wright

[permalink] [raw]
Subject: [patch 34/76] file capabilities: simplify signal check

-stable review patch. If anyone has any objections, please let us know.
---------------------

From: Serge E. Hallyn <[email protected]>

Simplify the uid equivalence check in cap_task_kill(). Anyone can kill a
process owned by the same uid.

Without this patch wireshark is reported to fail.

Signed-off-by: Serge E. Hallyn <[email protected]>
Signed-off-by: Andrew G. Morgan <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
Signed-off-by: Chris Wright <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
---
security/commoncap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -539,7 +539,7 @@ int cap_task_kill(struct task_struct *p,
* allowed.
* We must preserve legacy signal behavior in this case.
*/
- if (p->euid == 0 && p->uid == current->uid)
+ if (p->uid == current->uid)
return 0;

/* sigcont is permitted within same session */

--