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.h23
1 files changed, 19 insertions, 4 deletions
diff --git a/include/linux/security.h b/include/linux/security.h
index c7ea15716dce..d4b13d617f63 100644
--- a/include/linux/security.h
+++ b/include/linux/security.h
@@ -567,6 +567,9 @@ struct swap_info_struct;
567 * @p. 567 * @p.
568 * @p contains the task_struct for the process. 568 * @p contains the task_struct for the process.
569 * Return 0 if permission is granted. 569 * Return 0 if permission is granted.
570 * @task_getsecid:
571 * Retrieve the security identifier of the process @p.
572 * @p contains the task_struct for the process and place is into @secid.
570 * @task_setgroups: 573 * @task_setgroups:
571 * Check permission before setting the supplementary group set of the 574 * Check permission before setting the supplementary group set of the
572 * current process. 575 * current process.
@@ -615,6 +618,7 @@ struct swap_info_struct;
615 * @p contains the task_struct for process. 618 * @p contains the task_struct for process.
616 * @info contains the signal information. 619 * @info contains the signal information.
617 * @sig contains the signal value. 620 * @sig contains the signal value.
621 * @secid contains the sid of the process where the signal originated
618 * Return 0 if permission is granted. 622 * Return 0 if permission is granted.
619 * @task_wait: 623 * @task_wait:
620 * Check permission before allowing a process to reap a child process @p 624 * Check permission before allowing a process to reap a child process @p
@@ -1219,6 +1223,7 @@ struct security_operations {
1219 int (*task_setpgid) (struct task_struct * p, pid_t pgid); 1223 int (*task_setpgid) (struct task_struct * p, pid_t pgid);
1220 int (*task_getpgid) (struct task_struct * p); 1224 int (*task_getpgid) (struct task_struct * p);
1221 int (*task_getsid) (struct task_struct * p); 1225 int (*task_getsid) (struct task_struct * p);
1226 void (*task_getsecid) (struct task_struct * p, u32 * secid);
1222 int (*task_setgroups) (struct group_info *group_info); 1227 int (*task_setgroups) (struct group_info *group_info);
1223 int (*task_setnice) (struct task_struct * p, int nice); 1228 int (*task_setnice) (struct task_struct * p, int nice);
1224 int (*task_setioprio) (struct task_struct * p, int ioprio); 1229 int (*task_setioprio) (struct task_struct * p, int ioprio);
@@ -1228,7 +1233,7 @@ struct security_operations {
1228 int (*task_getscheduler) (struct task_struct * p); 1233 int (*task_getscheduler) (struct task_struct * p);
1229 int (*task_movememory) (struct task_struct * p); 1234 int (*task_movememory) (struct task_struct * p);
1230 int (*task_kill) (struct task_struct * p, 1235 int (*task_kill) (struct task_struct * p,
1231 struct siginfo * info, int sig); 1236 struct siginfo * info, int sig, u32 secid);
1232 int (*task_wait) (struct task_struct * p); 1237 int (*task_wait) (struct task_struct * p);
1233 int (*task_prctl) (int option, unsigned long arg2, 1238 int (*task_prctl) (int option, unsigned long arg2,
1234 unsigned long arg3, unsigned long arg4, 1239 unsigned long arg3, unsigned long arg4,
@@ -1839,6 +1844,11 @@ static inline int security_task_getsid (struct task_struct *p)
1839 return security_ops->task_getsid (p); 1844 return security_ops->task_getsid (p);
1840} 1845}
1841 1846
1847static inline void security_task_getsecid (struct task_struct *p, u32 *secid)
1848{
1849 security_ops->task_getsecid (p, secid);
1850}
1851
1842static inline int security_task_setgroups (struct group_info *group_info) 1852static inline int security_task_setgroups (struct group_info *group_info)
1843{ 1853{
1844 return security_ops->task_setgroups (group_info); 1854 return security_ops->task_setgroups (group_info);
@@ -1878,9 +1888,10 @@ static inline int security_task_movememory (struct task_struct *p)
1878} 1888}
1879 1889
1880static inline int security_task_kill (struct task_struct *p, 1890static inline int security_task_kill (struct task_struct *p,
1881 struct siginfo *info, int sig) 1891 struct siginfo *info, int sig,
1892 u32 secid)
1882{ 1893{
1883 return security_ops->task_kill (p, info, sig); 1894 return security_ops->task_kill (p, info, sig, secid);
1884} 1895}
1885 1896
1886static inline int security_task_wait (struct task_struct *p) 1897static inline int security_task_wait (struct task_struct *p)
@@ -2491,6 +2502,9 @@ static inline int security_task_getsid (struct task_struct *p)
2491 return 0; 2502 return 0;
2492} 2503}
2493 2504
2505static inline void security_task_getsecid (struct task_struct *p, u32 *secid)
2506{ }
2507
2494static inline int security_task_setgroups (struct group_info *group_info) 2508static inline int security_task_setgroups (struct group_info *group_info)
2495{ 2509{
2496 return 0; 2510 return 0;
@@ -2530,7 +2544,8 @@ static inline int security_task_movememory (struct task_struct *p)
2530} 2544}
2531 2545
2532static inline int security_task_kill (struct task_struct *p, 2546static inline int security_task_kill (struct task_struct *p,
2533 struct siginfo *info, int sig) 2547 struct siginfo *info, int sig,
2548 u32 secid)
2534{ 2549{
2535 return 0; 2550 return 0;
2536} 2551}