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 de53f6eb0c08..d417936562db 100644
--- a/security/dummy.c
+++ b/security/dummy.c
@@ -524,6 +524,11 @@ static int dummy_task_setioprio (struct task_struct *p, int ioprio)
524 return 0; 524 return 0;
525} 525}
526 526
527static int dummy_task_getioprio (struct task_struct *p)
528{
529 return 0;
530}
531
527static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim) 532static int dummy_task_setrlimit (unsigned int resource, struct rlimit *new_rlim)
528{ 533{
529 return 0; 534 return 0;
@@ -988,6 +993,7 @@ void security_fixup_ops (struct security_operations *ops)
988 set_to_dummy_if_null(ops, task_setgroups); 993 set_to_dummy_if_null(ops, task_setgroups);
989 set_to_dummy_if_null(ops, task_setnice); 994 set_to_dummy_if_null(ops, task_setnice);
990 set_to_dummy_if_null(ops, task_setioprio); 995 set_to_dummy_if_null(ops, task_setioprio);
996 set_to_dummy_if_null(ops, task_getioprio);
991 set_to_dummy_if_null(ops, task_setrlimit); 997 set_to_dummy_if_null(ops, task_setrlimit);
992 set_to_dummy_if_null(ops, task_setscheduler); 998 set_to_dummy_if_null(ops, task_setscheduler);
993 set_to_dummy_if_null(ops, task_getscheduler); 999 set_to_dummy_if_null(ops, task_getscheduler);
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c
index a5189a347354..51bec4c88f19 100644
--- a/security/selinux/hooks.c
+++ b/security/selinux/hooks.c
@@ -2671,6 +2671,11 @@ static int selinux_task_setioprio(struct task_struct *p, int ioprio)
2671 return task_has_perm(current, p, PROCESS__SETSCHED); 2671 return task_has_perm(current, p, PROCESS__SETSCHED);
2672} 2672}
2673 2673
2674static int selinux_task_getioprio(struct task_struct *p)
2675{
2676 return task_has_perm(current, p, PROCESS__GETSCHED);
2677}
2678
2674static int selinux_task_setrlimit(unsigned int resource, struct rlimit *new_rlim) 2679static int selinux_task_setrlimit(unsigned int resource, struct rlimit *new_rlim)
2675{ 2680{
2676 struct rlimit *old_rlim = current->signal->rlim + resource; 2681 struct rlimit *old_rlim = current->signal->rlim + resource;
@@ -4449,6 +4454,7 @@ static struct security_operations selinux_ops = {
4449 .task_setgroups = selinux_task_setgroups, 4454 .task_setgroups = selinux_task_setgroups,
4450 .task_setnice = selinux_task_setnice, 4455 .task_setnice = selinux_task_setnice,
4451 .task_setioprio = selinux_task_setioprio, 4456 .task_setioprio = selinux_task_setioprio,
4457 .task_getioprio = selinux_task_getioprio,
4452 .task_setrlimit = selinux_task_setrlimit, 4458 .task_setrlimit = selinux_task_setrlimit,
4453 .task_setscheduler = selinux_task_setscheduler, 4459 .task_setscheduler = selinux_task_setscheduler,
4454 .task_getscheduler = selinux_task_getscheduler, 4460 .task_getscheduler = selinux_task_getscheduler,