diff options
Diffstat (limited to 'security/selinux/hooks.c')
-rw-r--r-- | security/selinux/hooks.c | 11 |
1 files changed, 3 insertions, 8 deletions
diff --git a/security/selinux/hooks.c b/security/selinux/hooks.c index b61b9554bc27..d987048d3f33 100644 --- a/security/selinux/hooks.c +++ b/security/selinux/hooks.c | |||
@@ -101,6 +101,8 @@ static int __init selinux_enabled_setup(char *str) | |||
101 | return 1; | 101 | return 1; |
102 | } | 102 | } |
103 | __setup("selinux=", selinux_enabled_setup); | 103 | __setup("selinux=", selinux_enabled_setup); |
104 | #else | ||
105 | int selinux_enabled = 1; | ||
104 | #endif | 106 | #endif |
105 | 107 | ||
106 | /* Original (dummy) security module. */ | 108 | /* Original (dummy) security module. */ |
@@ -4052,13 +4054,6 @@ static int selinux_ipc_permission(struct kern_ipc_perm *ipcp, short flag) | |||
4052 | return ipc_has_perm(ipcp, av); | 4054 | return ipc_has_perm(ipcp, av); |
4053 | } | 4055 | } |
4054 | 4056 | ||
4055 | static int selinux_ipc_getsecurity(struct kern_ipc_perm *ipcp, void *buffer, size_t size) | ||
4056 | { | ||
4057 | struct ipc_security_struct *isec = ipcp->security; | ||
4058 | |||
4059 | return selinux_getsecurity(isec->sid, buffer, size); | ||
4060 | } | ||
4061 | |||
4062 | /* module stacking operations */ | 4057 | /* module stacking operations */ |
4063 | static int selinux_register_security (const char *name, struct security_operations *ops) | 4058 | static int selinux_register_security (const char *name, struct security_operations *ops) |
4064 | { | 4059 | { |
@@ -4321,7 +4316,6 @@ static struct security_operations selinux_ops = { | |||
4321 | .task_to_inode = selinux_task_to_inode, | 4316 | .task_to_inode = selinux_task_to_inode, |
4322 | 4317 | ||
4323 | .ipc_permission = selinux_ipc_permission, | 4318 | .ipc_permission = selinux_ipc_permission, |
4324 | .ipc_getsecurity = selinux_ipc_getsecurity, | ||
4325 | 4319 | ||
4326 | .msg_msg_alloc_security = selinux_msg_msg_alloc_security, | 4320 | .msg_msg_alloc_security = selinux_msg_msg_alloc_security, |
4327 | .msg_msg_free_security = selinux_msg_msg_free_security, | 4321 | .msg_msg_free_security = selinux_msg_msg_free_security, |
@@ -4543,6 +4537,7 @@ int selinux_disable(void) | |||
4543 | printk(KERN_INFO "SELinux: Disabled at runtime.\n"); | 4537 | printk(KERN_INFO "SELinux: Disabled at runtime.\n"); |
4544 | 4538 | ||
4545 | selinux_disabled = 1; | 4539 | selinux_disabled = 1; |
4540 | selinux_enabled = 0; | ||
4546 | 4541 | ||
4547 | /* Reset security_ops to the secondary module, dummy or capability. */ | 4542 | /* Reset security_ops to the secondary module, dummy or capability. */ |
4548 | security_ops = secondary_ops; | 4543 | security_ops = secondary_ops; |