aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/security.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/security.h')
-rw-r--r--include/linux/security.h16
1 files changed, 16 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index 383c320fc834..65b32a0c6207 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -577,6 +577,11 @@ struct swap_info_struct;
577 * @p contains the task_struct of process. 577 * @p contains the task_struct of process.
578 * @nice contains the new nice value. 578 * @nice contains the new nice value.
579 * Return 0 if permission is granted. 579 * Return 0 if permission is granted.
580 * @task_setioprio
581 * Check permission before setting the ioprio value of @p to @ioprio.
582 * @p contains the task_struct of process.
583 * @ioprio contains the new ioprio value
584 * Return 0 if permission is granted.
580 * @task_setrlimit: 585 * @task_setrlimit:
581 * Check permission before setting the resource limits of the current 586 * Check permission before setting the resource limits of the current
582 * process for @resource to @new_rlim. The old resource limit values can 587 * process for @resource to @new_rlim. The old resource limit values can
@@ -1210,6 +1215,7 @@ struct security_operations {
1210 int (*task_getsid) (struct task_struct * p); 1215 int (*task_getsid) (struct task_struct * p);
1211 int (*task_setgroups) (struct group_info *group_info); 1216 int (*task_setgroups) (struct group_info *group_info);
1212 int (*task_setnice) (struct task_struct * p, int nice); 1217 int (*task_setnice) (struct task_struct * p, int nice);
1218 int (*task_setioprio) (struct task_struct * p, int ioprio);
1213 int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim); 1219 int (*task_setrlimit) (unsigned int resource, struct rlimit * new_rlim);
1214 int (*task_setscheduler) (struct task_struct * p, int policy, 1220 int (*task_setscheduler) (struct task_struct * p, int policy,
1215 struct sched_param * lp); 1221 struct sched_param * lp);
@@ -1836,6 +1842,11 @@ static inline int security_task_setnice (struct task_struct *p, int nice)
1836 return security_ops->task_setnice (p, nice); 1842 return security_ops->task_setnice (p, nice);
1837} 1843}
1838 1844
1845static inline int security_task_setioprio (struct task_struct *p, int ioprio)
1846{
1847 return security_ops->task_setioprio (p, ioprio);
1848}
1849
1839static inline int security_task_setrlimit (unsigned int resource, 1850static inline int security_task_setrlimit (unsigned int resource,
1840 struct rlimit *new_rlim) 1851 struct rlimit *new_rlim)
1841{ 1852{
@@ -2478,6 +2489,11 @@ static inline int security_task_setnice (struct task_struct *p, int nice)
2478 return 0; 2489 return 0;
2479} 2490}
2480 2491
2492static inline int security_task_setioprio (struct task_struct *p, int ioprio)
2493{
2494 return 0;
2495}
2496
2481static inline int security_task_setrlimit (unsigned int resource, 2497static inline int security_task_setrlimit (unsigned int resource,
2482 struct rlimit *new_rlim) 2498 struct rlimit *new_rlim)
2483{ 2499{