diff options
Diffstat (limited to 'include/linux/security.h')
| -rw-r--r-- | include/linux/security.h | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/include/linux/security.h b/include/linux/security.h index ba96471c11ba..a1b7dbd127ff 100644 --- a/include/linux/security.h +++ b/include/linux/security.h | |||
| @@ -1281,6 +1281,25 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1281 | * @alter contains the flag indicating whether changes are to be made. | 1281 | * @alter contains the flag indicating whether changes are to be made. |
| 1282 | * Return 0 if permission is granted. | 1282 | * Return 0 if permission is granted. |
| 1283 | * | 1283 | * |
| 1284 | * @binder_set_context_mgr | ||
| 1285 | * Check whether @mgr is allowed to be the binder context manager. | ||
| 1286 | * @mgr contains the task_struct for the task being registered. | ||
| 1287 | * Return 0 if permission is granted. | ||
| 1288 | * @binder_transaction | ||
| 1289 | * Check whether @from is allowed to invoke a binder transaction call | ||
| 1290 | * to @to. | ||
| 1291 | * @from contains the task_struct for the sending task. | ||
| 1292 | * @to contains the task_struct for the receiving task. | ||
| 1293 | * @binder_transfer_binder | ||
| 1294 | * Check whether @from is allowed to transfer a binder reference to @to. | ||
| 1295 | * @from contains the task_struct for the sending task. | ||
| 1296 | * @to contains the task_struct for the receiving task. | ||
| 1297 | * @binder_transfer_file | ||
| 1298 | * Check whether @from is allowed to transfer @file to @to. | ||
| 1299 | * @from contains the task_struct for the sending task. | ||
| 1300 | * @file contains the struct file being transferred. | ||
| 1301 | * @to contains the task_struct for the receiving task. | ||
| 1302 | * | ||
| 1284 | * @ptrace_access_check: | 1303 | * @ptrace_access_check: |
| 1285 | * Check permission before allowing the current process to trace the | 1304 | * Check permission before allowing the current process to trace the |
| 1286 | * @child process. | 1305 | * @child process. |
| @@ -1441,6 +1460,14 @@ static inline void security_free_mnt_opts(struct security_mnt_opts *opts) | |||
| 1441 | struct security_operations { | 1460 | struct security_operations { |
| 1442 | char name[SECURITY_NAME_MAX + 1]; | 1461 | char name[SECURITY_NAME_MAX + 1]; |
| 1443 | 1462 | ||
| 1463 | int (*binder_set_context_mgr) (struct task_struct *mgr); | ||
| 1464 | int (*binder_transaction) (struct task_struct *from, | ||
| 1465 | struct task_struct *to); | ||
| 1466 | int (*binder_transfer_binder) (struct task_struct *from, | ||
| 1467 | struct task_struct *to); | ||
| 1468 | int (*binder_transfer_file) (struct task_struct *from, | ||
| 1469 | struct task_struct *to, struct file *file); | ||
| 1470 | |||
| 1444 | int (*ptrace_access_check) (struct task_struct *child, unsigned int mode); | 1471 | int (*ptrace_access_check) (struct task_struct *child, unsigned int mode); |
| 1445 | int (*ptrace_traceme) (struct task_struct *parent); | 1472 | int (*ptrace_traceme) (struct task_struct *parent); |
| 1446 | int (*capget) (struct task_struct *target, | 1473 | int (*capget) (struct task_struct *target, |
| @@ -1739,6 +1766,13 @@ extern void __init security_fixup_ops(struct security_operations *ops); | |||
| 1739 | 1766 | ||
| 1740 | 1767 | ||
| 1741 | /* Security operations */ | 1768 | /* Security operations */ |
| 1769 | int security_binder_set_context_mgr(struct task_struct *mgr); | ||
| 1770 | int security_binder_transaction(struct task_struct *from, | ||
| 1771 | struct task_struct *to); | ||
| 1772 | int security_binder_transfer_binder(struct task_struct *from, | ||
| 1773 | struct task_struct *to); | ||
| 1774 | int security_binder_transfer_file(struct task_struct *from, | ||
| 1775 | struct task_struct *to, struct file *file); | ||
| 1742 | int security_ptrace_access_check(struct task_struct *child, unsigned int mode); | 1776 | int security_ptrace_access_check(struct task_struct *child, unsigned int mode); |
| 1743 | int security_ptrace_traceme(struct task_struct *parent); | 1777 | int security_ptrace_traceme(struct task_struct *parent); |
| 1744 | int security_capget(struct task_struct *target, | 1778 | int security_capget(struct task_struct *target, |
| @@ -1927,6 +1961,30 @@ static inline int security_init(void) | |||
| 1927 | return 0; | 1961 | return 0; |
| 1928 | } | 1962 | } |
| 1929 | 1963 | ||
| 1964 | static inline int security_binder_set_context_mgr(struct task_struct *mgr) | ||
| 1965 | { | ||
| 1966 | return 0; | ||
| 1967 | } | ||
| 1968 | |||
| 1969 | static inline int security_binder_transaction(struct task_struct *from, | ||
| 1970 | struct task_struct *to) | ||
| 1971 | { | ||
| 1972 | return 0; | ||
| 1973 | } | ||
| 1974 | |||
| 1975 | static inline int security_binder_transfer_binder(struct task_struct *from, | ||
| 1976 | struct task_struct *to) | ||
| 1977 | { | ||
| 1978 | return 0; | ||
| 1979 | } | ||
| 1980 | |||
| 1981 | static inline int security_binder_transfer_file(struct task_struct *from, | ||
| 1982 | struct task_struct *to, | ||
| 1983 | struct file *file) | ||
| 1984 | { | ||
| 1985 | return 0; | ||
| 1986 | } | ||
| 1987 | |||
| 1930 | static inline int security_ptrace_access_check(struct task_struct *child, | 1988 | static inline int security_ptrace_access_check(struct task_struct *child, |
| 1931 | unsigned int mode) | 1989 | unsigned int mode) |
| 1932 | { | 1990 | { |
