diff options
Diffstat (limited to 'security/smack/smack_lsm.c')
-rw-r--r-- | security/smack/smack_lsm.c | 28 |
1 files changed, 3 insertions, 25 deletions
diff --git a/security/smack/smack_lsm.c b/security/smack/smack_lsm.c index 4a09293efa00..ee5a51cbc5eb 100644 --- a/security/smack/smack_lsm.c +++ b/security/smack/smack_lsm.c | |||
@@ -95,11 +95,12 @@ struct inode_smack *new_inode_smack(char *smack) | |||
95 | * | 95 | * |
96 | * Do the capability checks, and require read and write. | 96 | * Do the capability checks, and require read and write. |
97 | */ | 97 | */ |
98 | static int smack_ptrace(struct task_struct *ptp, struct task_struct *ctp) | 98 | static int smack_ptrace(struct task_struct *ptp, struct task_struct *ctp, |
99 | unsigned int mode) | ||
99 | { | 100 | { |
100 | int rc; | 101 | int rc; |
101 | 102 | ||
102 | rc = cap_ptrace(ptp, ctp); | 103 | rc = cap_ptrace(ptp, ctp, mode); |
103 | if (rc != 0) | 104 | if (rc != 0) |
104 | return rc; | 105 | return rc; |
105 | 106 | ||
@@ -1821,27 +1822,6 @@ static void smack_ipc_getsecid(struct kern_ipc_perm *ipp, u32 *secid) | |||
1821 | *secid = smack_to_secid(smack); | 1822 | *secid = smack_to_secid(smack); |
1822 | } | 1823 | } |
1823 | 1824 | ||
1824 | /* module stacking operations */ | ||
1825 | |||
1826 | /** | ||
1827 | * smack_register_security - stack capability module | ||
1828 | * @name: module name | ||
1829 | * @ops: module operations - ignored | ||
1830 | * | ||
1831 | * Allow the capability module to register. | ||
1832 | */ | ||
1833 | static int smack_register_security(const char *name, | ||
1834 | struct security_operations *ops) | ||
1835 | { | ||
1836 | if (strcmp(name, "capability") != 0) | ||
1837 | return -EINVAL; | ||
1838 | |||
1839 | printk(KERN_INFO "%s: Registering secondary module %s\n", | ||
1840 | __func__, name); | ||
1841 | |||
1842 | return 0; | ||
1843 | } | ||
1844 | |||
1845 | /** | 1825 | /** |
1846 | * smack_d_instantiate - Make sure the blob is correct on an inode | 1826 | * smack_d_instantiate - Make sure the blob is correct on an inode |
1847 | * @opt_dentry: unused | 1827 | * @opt_dentry: unused |
@@ -2672,8 +2652,6 @@ struct security_operations smack_ops = { | |||
2672 | .netlink_send = cap_netlink_send, | 2652 | .netlink_send = cap_netlink_send, |
2673 | .netlink_recv = cap_netlink_recv, | 2653 | .netlink_recv = cap_netlink_recv, |
2674 | 2654 | ||
2675 | .register_security = smack_register_security, | ||
2676 | |||
2677 | .d_instantiate = smack_d_instantiate, | 2655 | .d_instantiate = smack_d_instantiate, |
2678 | 2656 | ||
2679 | .getprocattr = smack_getprocattr, | 2657 | .getprocattr = smack_getprocattr, |