[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>
This commit is contained in:
committed by
Linus Torvalds
parent
9216dfad4f
commit
03e6806063
@@ -516,6 +516,11 @@ static int dummy_task_setnice (struct task_struct *p, int nice)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dummy_task_setioprio (struct task_struct *p, int ioprio)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim)
|
||||
{
|
||||
return 0;
|
||||
@@ -972,6 +977,7 @@ void security_fixup_ops (struct security_operations *ops)
|
||||
set_to_dummy_if_null(ops, task_getsid);
|
||||
set_to_dummy_if_null(ops, task_setgroups);
|
||||
set_to_dummy_if_null(ops, task_setnice);
|
||||
set_to_dummy_if_null(ops, task_setioprio);
|
||||
set_to_dummy_if_null(ops, task_setrlimit);
|
||||
set_to_dummy_if_null(ops, task_setscheduler);
|
||||
set_to_dummy_if_null(ops, task_getscheduler);
|
||||
|
Reference in New Issue
Block a user