aboutsummaryrefslogtreecommitdiffstats
path: root/security/dummy.c
diff options
context:
space:
mode:
authorDavid Quigley <dpquigl@tycho.nsa.gov>2006-06-30 04:55:46 -0400
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-30 14:25:36 -0400
commitf9008e4c5c525941967b67777945aa6266ab6326 (patch)
treea0c9436485b80d548ef74d5f1aec0f6d0309af6e /security/dummy.c
parented11d9eb2228acc483c819ab353e3c41bcb158fa (diff)
[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>
Diffstat (limited to 'security/dummy.c')
-rw-r--r--security/dummy.c6
1 files changed, 5 insertions, 1 deletions
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)
506 return 0; 506 return 0;
507} 507}
508 508
509static void dummy_task_getsecid (struct task_struct *p, u32 *secid)
510{ }
511
509static int dummy_task_setgroups (struct group_info *group_info) 512static int dummy_task_setgroups (struct group_info *group_info)
510{ 513{
511 return 0; 514 return 0;
@@ -548,7 +551,7 @@ static int dummy_task_wait (struct task_struct *p)
548} 551}
549 552
550static int dummy_task_kill (struct task_struct *p, struct siginfo *info, 553static int dummy_task_kill (struct task_struct *p, struct siginfo *info,
551 int sig) 554 int sig, u32 secid)
552{ 555{
553 return 0; 556 return 0;
554} 557}
@@ -981,6 +984,7 @@ void security_fixup_ops (struct security_operations *ops)
981 set_to_dummy_if_null(ops, task_setpgid); 984 set_to_dummy_if_null(ops, task_setpgid);
982 set_to_dummy_if_null(ops, task_getpgid); 985 set_to_dummy_if_null(ops, task_getpgid);
983 set_to_dummy_if_null(ops, task_getsid); 986 set_to_dummy_if_null(ops, task_getsid);
987 set_to_dummy_if_null(ops, task_getsecid);
984 set_to_dummy_if_null(ops, task_setgroups); 988 set_to_dummy_if_null(ops, task_setgroups);
985 set_to_dummy_if_null(ops, task_setnice); 989 set_to_dummy_if_null(ops, task_setnice);
986 set_to_dummy_if_null(ops, task_setioprio); 990 set_to_dummy_if_null(ops, task_setioprio);