aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/security.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index d4b13d617f63..f75303831d09 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -585,6 +585,10 @@ struct swap_info_struct;
585 * @p contains the task_struct of process. 585 * @p contains the task_struct of process.
586 * @ioprio contains the new ioprio value 586 * @ioprio contains the new ioprio value
587 * Return 0 if permission is granted. 587 * Return 0 if permission is granted.
588 * @task_getioprio
589 * Check permission before getting the ioprio value of @p.
590 * @p contains the task_struct of process.
591 * Return 0 if permission is granted.
588 * @task_setrlimit: 592 * @task_setrlimit:
589 * Check permission before setting the resource limits of the current 593 * Check permission before setting the resource limits of the current
590 * process for @resource to @new_rlim. The old resource limit values can 594 * process for @resource to @new_rlim. The old resource limit values can
@@ -1227,6 +1231,7 @@ struct security_operations {
1227 int (*task_setgroups) (struct group_info *group_info); 1231 int (*task_setgroups) (struct group_info *group_info);
1228 int (*task_setnice) (struct task_struct * p, int nice); 1232 int (*task_setnice) (struct task_struct * p, int nice);
1229 int (*task_setioprio) (struct task_struct * p, int ioprio); 1233 int (*task_setioprio) (struct task_struct * p, int ioprio);
1234 int (*task_getioprio) (struct task_struct * p);
1230 int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim); 1235 int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim);
1231 int (*task_setscheduler) (struct task_struct * p, int policy, 1236 int (*task_setscheduler) (struct task_struct * p, int policy,
1232 struct sched_param * lp); 1237 struct sched_param * lp);
@@ -1864,6 +1869,11 @@ static inline int security_task_setioprio (struct task_struct *p, int ioprio)
1864 return security_ops->task_setioprio (p, ioprio); 1869 return security_ops->task_setioprio (p, ioprio);
1865} 1870}
1866 1871
1872static inline int security_task_getioprio (struct task_struct *p)
1873{
1874 return security_ops->task_getioprio (p);
1875}
1876
1867static inline int security_task_setrlimit (unsigned int resource, 1877static inline int security_task_setrlimit (unsigned int resource,
1868 struct rlimit *new_rlim) 1878 struct rlimit *new_rlim)
1869{ 1879{
@@ -2520,6 +2530,11 @@ static inline int security_task_setioprio (struct task_struct *p, int ioprio)
2520 return 0; 2530 return 0;
2521} 2531}
2522 2532
2533static inline int security_task_getioprio (struct task_struct *p)
2534{
2535 return 0;
2536}
2537
2523static inline int security_task_setrlimit (unsigned int resource, 2538static inline int security_task_setrlimit (unsigned int resource,
2524 struct rlimit *new_rlim) 2539 struct rlimit *new_rlim)
2525{ 2540{