From: Stephen Smalley Date: Mon, 4 May 2009 19:43:18 +0000 (-0400) Subject: selinux: Fix send_sigiotask hook X-Git-Tag: v2.6.30-rc5~41^2 X-Git-Url: https://asedeno.scripts.mit.edu/gitweb/?a=commitdiff_plain;h=65c90bca0dba56f60dc4ce2a529140c3cc440f22;p=linux.git selinux: Fix send_sigiotask hook The CRED patch incorrectly converted the SELinux send_sigiotask hook to use the current task SID rather than the target task SID in its permission check, yielding the wrong permission check. This fixes the hook function. Detected by the ltp selinux testsuite and confirmed to correct the test failure. Signed-off-by: Stephen Smalley Signed-off-by: James Morris --- diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index ba808ef6babb..2fcad7c33eaf 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c @@ -3153,7 +3153,7 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk, struct fown_struct *fown, int signum) { struct file *file; - u32 sid = current_sid(); + u32 sid = task_sid(tsk); u32 perm; struct file_security_struct *fsec;