Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=91ad997a34d7abca1f04e819e31eb9f3d4e20585 Commit: 91ad997a34d7abca1f04e819e31eb9f3d4e20585 Parent: 20a1022d4ac5c53f0956006fd9e30cf4846d5e58 Author: Serge E. Hallyn <[EMAIL PROTECTED]> AuthorDate: Wed Nov 14 17:00:34 2007 -0800 Committer: Linus Torvalds <[EMAIL PROTECTED]> CommitDate: Wed Nov 14 18:45:44 2007 -0800
file capabilities: allow sigcont within session Fix http://bugzilla.kernel.org/show_bug.cgi?id=9247 Allow sigcont to be sent to a process with greater capabilities if it is in the same session. Otherwise, a shell from which I've started a root shell and done 'suspend' can't be restarted by the parent shell. Also don't do file-capabilities signaling checks when uids for the processes don't match, since the standard check_kill_permission will have done those checks. [EMAIL PROTECTED]: coding-style cleanups] Signed-off-by: Serge E. Hallyn <[EMAIL PROTECTED]> Acked-by: Andrew Morgan <[EMAIL PROTECTED]> Cc: Chris Wright <[EMAIL PROTECTED]> Tested-by: "Theodore Ts'o" <[EMAIL PROTECTED]> Cc: Stephen Smalley <[EMAIL PROTECTED]> Cc: "Rafael J. Wysocki" <[EMAIL PROTECTED]> Cc: Chris Wright <[EMAIL PROTECTED]> Cc: James Morris <[EMAIL PROTECTED]> Cc: Stephen Smalley <[EMAIL PROTECTED]> Signed-off-by: Andrew Morton <[EMAIL PROTECTED]> Signed-off-by: Linus Torvalds <[EMAIL PROTECTED]> --- security/commoncap.c | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/security/commoncap.c b/security/commoncap.c index bf67871..302e8d0 100644 --- a/security/commoncap.c +++ b/security/commoncap.c @@ -526,6 +526,10 @@ int cap_task_kill(struct task_struct *p, struct siginfo *info, if (info != SEND_SIG_NOINFO && (is_si_special(info) || SI_FROMKERNEL(info))) return 0; + /* sigcont is permitted within same session */ + if (sig == SIGCONT && (task_session_nr(current) == task_session_nr(p))) + return 0; + if (secid) /* * Signal sent as a particular user. - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html