Browse Source

file capabilities: simplify signal check

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 <serue@us.ibm.com>
Signed-off-by: Andrew G. Morgan <morgan@kernel.org>
Cc: <stable@kernel.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Serge E. Hallyn 17 năm trước cách đây
mục cha
commit
094972840f
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      security/commoncap.c

+ 1 - 1
security/commoncap.c

@@ -552,7 +552,7 @@ int cap_task_kill(struct task_struct *p, struct siginfo *info,
 	 * allowed.
 	 * allowed.
 	 * We must preserve legacy signal behavior in this case.
 	 * We must preserve legacy signal behavior in this case.
 	 */
 	 */
-	if (p->euid == 0 && p->uid == current->uid)
+	if (p->uid == current->uid)
 		return 0;
 		return 0;
 
 
 	/* sigcont is permitted within same session */
 	/* sigcont is permitted within same session */