mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 02:32:09 -04:00
security: remove register_security hook
The register security hook is no longer required, as the capability module is always registered. LSMs wishing to stack capability as a secondary module should do so explicitly. Signed-off-by: James Morris <[email protected]> Acked-by: Stephen Smalley <[email protected]> Acked-by: Greg Kroah-Hartman <[email protected]>
This commit is contained in:
parent
93cbace7a0
commit
6f0f0fd496
6 changed files with 5 additions and 105 deletions
|
|
@ -1822,27 +1822,6 @@ static void smack_ipc_getsecid(struct kern_ipc_perm *ipp, u32 *secid)
|
|||
*secid = smack_to_secid(smack);
|
||||
}
|
||||
|
||||
/* module stacking operations */
|
||||
|
||||
/**
|
||||
* smack_register_security - stack capability module
|
||||
* @name: module name
|
||||
* @ops: module operations - ignored
|
||||
*
|
||||
* Allow the capability module to register.
|
||||
*/
|
||||
static int smack_register_security(const char *name,
|
||||
struct security_operations *ops)
|
||||
{
|
||||
if (strcmp(name, "capability") != 0)
|
||||
return -EINVAL;
|
||||
|
||||
printk(KERN_INFO "%s: Registering secondary module %s\n",
|
||||
__func__, name);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* smack_d_instantiate - Make sure the blob is correct on an inode
|
||||
* @opt_dentry: unused
|
||||
|
|
@ -2673,8 +2652,6 @@ struct security_operations smack_ops = {
|
|||
.netlink_send = cap_netlink_send,
|
||||
.netlink_recv = cap_netlink_recv,
|
||||
|
||||
.register_security = smack_register_security,
|
||||
|
||||
.d_instantiate = smack_d_instantiate,
|
||||
|
||||
.getprocattr = smack_getprocattr,
|
||||
|
|
|
|||
Loading…
Reference in a new issue