aboutsummaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
Diffstat (limited to 'security')
-rw-r--r--security/dummy.c6
-rw-r--r--security/selinux/hooks.c6
2 files changed, 12 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
519static int dummy_task_setioprio (struct task_struct *p, int ioprio)
520{
521 return 0;
522}
523
519static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim) 524static 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);
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index 093efba4d9b6..9dcf298921d4 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2645,6 +2645,11 @@ static int selinux_task_setnice(struct task_struct *p, int nice)
2645 return task_has_perm(current,p, PROCESS__SETSCHED); 2645 return task_has_perm(current,p, PROCESS__SETSCHED);
2646} 2646}
2647 2647
2648static int selinux_task_setioprio(struct task_struct *p, int ioprio)
2649{
2650 return task_has_perm(current, p, PROCESS__SETSCHED);
2651}
2652
2648static int selinux_task_setrlimit(unsigned int resource, struct rlimit *new_rlim) 2653static int selinux_task_setrlimit(unsigned int resource, struct rlimit *new_rlim)
2649{ 2654{
2650 struct rlimit *old_rlim = current->signal->rlim + resource; 2655 struct rlimit *old_rlim = current->signal->rlim + resource;
@@ -4383,6 +4388,7 @@ static struct security_operations selinux_ops = {
4383 .task_getsid = selinux_task_getsid, 4388 .task_getsid = selinux_task_getsid,
4384 .task_setgroups = selinux_task_setgroups, 4389 .task_setgroups = selinux_task_setgroups,
4385 .task_setnice = selinux_task_setnice, 4390 .task_setnice = selinux_task_setnice,
4391 .task_setioprio = selinux_task_setioprio,
4386 .task_setrlimit = selinux_task_setrlimit, 4392 .task_setrlimit = selinux_task_setrlimit,
4387 .task_setscheduler = selinux_task_setscheduler, 4393 .task_setscheduler = selinux_task_setscheduler,
4388 .task_getscheduler = selinux_task_getscheduler, 4394 .task_getscheduler = selinux_task_getscheduler,