Commit 65c90bca authored by Stephen Smalley's avatar Stephen Smalley Committed by James Morris

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: default avatarStephen Smalley <sds@tycho.nsa.gov>
Signed-off-by: default avatarJames Morris <jmorris@namei.org>
parent 091438dd
...@@ -3153,7 +3153,7 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk, ...@@ -3153,7 +3153,7 @@ static int selinux_file_send_sigiotask(struct task_struct *tsk,
struct fown_struct *fown, int signum) struct fown_struct *fown, int signum)
{ {
struct file *file; struct file *file;
u32 sid = current_sid(); u32 sid = task_sid(tsk);
u32 perm; u32 perm;
struct file_security_struct *fsec; struct file_security_struct *fsec;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment