diff options
Diffstat (limited to 'security')
-rw-r--r-- | security/capability.c | 6 | ||||
-rw-r--r-- | security/selinux/include/av_perm_to_string.h | 3 | ||||
-rw-r--r-- | security/selinux/include/av_permissions.h | 3 | ||||
-rw-r--r-- | security/selinux/xfrm.c | 8 |
4 files changed, 5 insertions, 15 deletions
diff --git a/security/capability.c b/security/capability.c index ec18d6075625..f9b35cc0b248 100644 --- a/security/capability.c +++ b/security/capability.c | |||
@@ -49,8 +49,6 @@ static struct security_operations capability_ops = { | |||
49 | .vm_enough_memory = cap_vm_enough_memory, | 49 | .vm_enough_memory = cap_vm_enough_memory, |
50 | }; | 50 | }; |
51 | 51 | ||
52 | #define MY_NAME __stringify(KBUILD_MODNAME) | ||
53 | |||
54 | /* flag to keep track of how we were registered */ | 52 | /* flag to keep track of how we were registered */ |
55 | static int secondary; | 53 | static int secondary; |
56 | 54 | ||
@@ -67,7 +65,7 @@ static int __init capability_init (void) | |||
67 | /* register ourselves with the security framework */ | 65 | /* register ourselves with the security framework */ |
68 | if (register_security (&capability_ops)) { | 66 | if (register_security (&capability_ops)) { |
69 | /* try registering with primary module */ | 67 | /* try registering with primary module */ |
70 | if (mod_reg_security (MY_NAME, &capability_ops)) { | 68 | if (mod_reg_security (KBUILD_MODNAME, &capability_ops)) { |
71 | printk (KERN_INFO "Failure registering capabilities " | 69 | printk (KERN_INFO "Failure registering capabilities " |
72 | "with primary security module.\n"); | 70 | "with primary security module.\n"); |
73 | return -EINVAL; | 71 | return -EINVAL; |
@@ -85,7 +83,7 @@ static void __exit capability_exit (void) | |||
85 | return; | 83 | return; |
86 | /* remove ourselves from the security framework */ | 84 | /* remove ourselves from the security framework */ |
87 | if (secondary) { | 85 | if (secondary) { |
88 | if (mod_unreg_security (MY_NAME, &capability_ops)) | 86 | if (mod_unreg_security (KBUILD_MODNAME, &capability_ops)) |
89 | printk (KERN_INFO "Failure unregistering capabilities " | 87 | printk (KERN_INFO "Failure unregistering capabilities " |
90 | "with primary module.\n"); | 88 | "with primary module.\n"); |
91 | return; | 89 | return; |
diff --git a/security/selinux/include/av_perm_to_string.h b/security/selinux/include/av_perm_to_string.h index 71aeb12f07c8..591e98d9315a 100644 --- a/security/selinux/include/av_perm_to_string.h +++ b/security/selinux/include/av_perm_to_string.h | |||
@@ -238,5 +238,4 @@ | |||
238 | S_(SECCLASS_NSCD, NSCD__SHMEMHOST, "shmemhost") | 238 | S_(SECCLASS_NSCD, NSCD__SHMEMHOST, "shmemhost") |
239 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__SENDTO, "sendto") | 239 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__SENDTO, "sendto") |
240 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RECVFROM, "recvfrom") | 240 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RECVFROM, "recvfrom") |
241 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RELABELFROM, "relabelfrom") | 241 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__SETCONTEXT, "setcontext") |
242 | S_(SECCLASS_ASSOCIATION, ASSOCIATION__RELABELTO, "relabelto") | ||
diff --git a/security/selinux/include/av_permissions.h b/security/selinux/include/av_permissions.h index d1d0996049e3..d7f02edf3930 100644 --- a/security/selinux/include/av_permissions.h +++ b/security/selinux/include/av_permissions.h | |||
@@ -908,8 +908,7 @@ | |||
908 | 908 | ||
909 | #define ASSOCIATION__SENDTO 0x00000001UL | 909 | #define ASSOCIATION__SENDTO 0x00000001UL |
910 | #define ASSOCIATION__RECVFROM 0x00000002UL | 910 | #define ASSOCIATION__RECVFROM 0x00000002UL |
911 | #define ASSOCIATION__RELABELFROM 0x00000004UL | 911 | #define ASSOCIATION__SETCONTEXT 0x00000004UL |
912 | #define ASSOCIATION__RELABELTO 0x00000008UL | ||
913 | 912 | ||
914 | #define NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL 0x00000001UL | 913 | #define NETLINK_KOBJECT_UEVENT_SOCKET__IOCTL 0x00000001UL |
915 | #define NETLINK_KOBJECT_UEVENT_SOCKET__READ 0x00000002UL | 914 | #define NETLINK_KOBJECT_UEVENT_SOCKET__READ 0x00000002UL |
diff --git a/security/selinux/xfrm.c b/security/selinux/xfrm.c index c4d87d4dca7b..5b7776504e4c 100644 --- a/security/selinux/xfrm.c +++ b/security/selinux/xfrm.c | |||
@@ -137,15 +137,9 @@ static int selinux_xfrm_sec_ctx_alloc(struct xfrm_sec_ctx **ctxp, struct xfrm_us | |||
137 | * Must be permitted to relabel from default socket type (process type) | 137 | * Must be permitted to relabel from default socket type (process type) |
138 | * to specified context | 138 | * to specified context |
139 | */ | 139 | */ |
140 | rc = avc_has_perm(tsec->sid, tsec->sid, | ||
141 | SECCLASS_ASSOCIATION, | ||
142 | ASSOCIATION__RELABELFROM, NULL); | ||
143 | if (rc) | ||
144 | goto out; | ||
145 | |||
146 | rc = avc_has_perm(tsec->sid, ctx->ctx_sid, | 140 | rc = avc_has_perm(tsec->sid, ctx->ctx_sid, |
147 | SECCLASS_ASSOCIATION, | 141 | SECCLASS_ASSOCIATION, |
148 | ASSOCIATION__RELABELTO, NULL); | 142 | ASSOCIATION__SETCONTEXT, NULL); |
149 | if (rc) | 143 | if (rc) |
150 | goto out; | 144 | goto out; |
151 | 145 | ||