[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 <dpquigl@tycho.nsa.gov> Signed-off-by: James Morris <jmorris@namei.org> Cc: Stephen Smalley <sds@tycho.nsa.gov> Cc: Chris Wright <chrisw@sous-sol.org> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
committed by
Linus Torvalds
parent
ed11d9eb22
commit
f9008e4c5c
@ -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);
|
||||
|
Reference in New Issue
Block a user