From: Serge E. Hallyn Date: Thu, 29 Nov 2007 00:21:47 +0000 (-0800) Subject: file capabilities: don't prevent signaling setuid root programs X-Git-Tag: v2.6.24-rc4~47 X-Git-Url: http://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8ec2328f1138a58eaea55ec6150985a1623b01c5;p=pandora-kernel.git file capabilities: don't prevent signaling setuid root programs An unprivileged process must be able to kill a setuid root program started by the same user. This is legacy behavior needed for instance for xinit to kill X when the window manager exits. When an unprivileged user runs a setuid root program in !SECURE_NOROOT mode, fP, fI, and fE are set full on, so pP' and pE' are full on. Then cap_task_kill() prevents the user from signaling the setuid root task. This is a change in behavior compared to when !CONFIG_SECURITY_FILE_CAPABILITIES. This patch introduces a special check into cap_task_kill() just to check whether a non-root user is signaling a setuid root program started by the same user. If so, then signal is allowed. Signed-off-by: Serge E. Hallyn Cc: Andrew Morgan Cc: Stephen Smalley Cc: Chris Wright Cc: James Morris Cc: Casey Schaufler Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed