From f9008e4c5c525941967b67777945aa6266ab6326 Mon Sep 17 00:00:00 2001 From: David Quigley Date: Fri, 30 Jun 2006 01:55:46 -0700 Subject: [PATCH] SELinux: extend task_kill hook to handle signals sent by AIO completion This patch extends the security_task_kill hook to handle signals sent by AIO completion. In this case, the secid of the task responsible for the signal needs to be obtained and saved earlier, so a security_task_getsecid() hook is added, and then this saved value is passed subsequently to the extended task_kill hook for use in checking. Signed-off-by: David Quigley Signed-off-by: James Morris Cc: Stephen Smalley Cc: Chris Wright Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- security/dummy.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'security/dummy.c') diff --git a/security/dummy.c b/security/dummy.c index 913540808577..de53f6eb0c08 100644 --- a/security/dummy.c +++ b/security/dummy.c @@ -506,6 +506,9 @@ static int dummy_task_getsid (struct task_struct *p) return 0; } +static void dummy_task_getsecid (struct task_struct *p, u32 *secid) +{ } + static int dummy_task_setgroups (struct group_info *group_info) { return 0; @@ -548,7 +551,7 @@ static int dummy_task_wait (struct task_struct *p) } static int dummy_task_kill (struct task_struct *p, struct siginfo *info, - int sig) + int sig, u32 secid) { return 0; } @@ -981,6 +984,7 @@ void security_fixup_ops (struct security_operations *ops) set_to_dummy_if_null(ops, task_setpgid); set_to_dummy_if_null(ops, task_getpgid); set_to_dummy_if_null(ops, task_getsid); + set_to_dummy_if_null(ops, task_getsecid); set_to_dummy_if_null(ops, task_setgroups); set_to_dummy_if_null(ops, task_setnice); set_to_dummy_if_null(ops, task_setioprio); -- cgit v1.2.3