diff options
author | James Morris <jmorris@namei.org> | 2006-06-23 05:03:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-06-23 10:42:53 -0400 |
commit | 03e68060636e05989ea94bcb671ab633948f328c (patch) | |
tree | aee5e7b55f31998536dd3a4f54f38caeee6105d6 /security/dummy.c | |
parent | 9216dfad4fc97ab639ef0885efc713f3d7a20d5b (diff) |
[PATCH] lsm: add task_setioprio hook
Implement an LSM hook for setting a task's IO priority, similar to the hook
for setting a tasks's nice value.
A previous version of this LSM hook was included in an older version of
multiadm by Jan Engelhardt, although I don't recall it being submitted
upstream.
Also included is the corresponding SELinux hook, which re-uses the setsched
permission in the proccess class.
Signed-off-by: James Morris <jmorris@namei.org>
Acked-by: Stephen Smalley <sds@tycho.nsa.gov>
Cc: Jan Engelhardt <jengelh@linux01.gwdg.de>
Cc: Chris Wright <chrisw@sous-sol.org>
Cc: Jens Axboe <axboe@suse.de>
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.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/security/dummy.c b/security/dummy.c index c98d553984ec..879a98523b1b 100644 --- a/security/dummy.c +++ b/security/dummy.c | |||
@@ -516,6 +516,11 @@ static int dummy_task_setnice (struct task_struct *p, int nice) | |||
516 | return 0; | 516 | return 0; |
517 | } | 517 | } |
518 | 518 | ||
519 | static int dummy_task_setioprio (struct task_struct *p, int ioprio) | ||
520 | { | ||
521 | return 0; | ||
522 | } | ||
523 | |||
519 | static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim) | 524 | static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim) |
520 | { | 525 | { |
521 | return 0; | 526 | return 0; |
@@ -972,6 +977,7 @@ void security_fixup_ops (struct security_operations *ops) | |||
972 | set_to_dummy_if_null(ops, task_getsid); | 977 | set_to_dummy_if_null(ops, task_getsid); |
973 | set_to_dummy_if_null(ops, task_setgroups); | 978 | set_to_dummy_if_null(ops, task_setgroups); |
974 | set_to_dummy_if_null(ops, task_setnice); | 979 | set_to_dummy_if_null(ops, task_setnice); |
980 | set_to_dummy_if_null(ops, task_setioprio); | ||
975 | set_to_dummy_if_null(ops, task_setrlimit); | 981 | set_to_dummy_if_null(ops, task_setrlimit); |
976 | set_to_dummy_if_null(ops, task_setscheduler); | 982 | set_to_dummy_if_null(ops, task_setscheduler); |
977 | set_to_dummy_if_null(ops, task_getscheduler); | 983 | set_to_dummy_if_null(ops, task_getscheduler); |