summaryrefslogtreecommitdiffstats
path: root/security/dummy.c
diff options
context:
space:
mode:
authorDavid Quigley <dpquigl@tycho.nsa.gov>2006-06-30 01:55:46 -0700
committerLinus Torvalds <torvalds@g5.osdl.org>2006-06-30 11:25:36 -0700
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 91354080857..de53f6eb0c0 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);