diff options
author | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-01-06 15:17:50 -0500 |
---|---|---|
committer | Sam Ravnborg <sam@mars.ravnborg.org> | 2006-01-06 15:17:50 -0500 |
commit | 367cb704212cd0c9273ba2b1e62523139210563b (patch) | |
tree | cda6402ea19e2b706ad8ac9a186f1e391ab3c6ea /security/capability.c | |
parent | 20ede2741551d4a1d24313292beb0da915a55911 (diff) |
kbuild: un-stringnify KBUILD_MODNAME
Now when kbuild passes KBUILD_MODNAME with "" do not __stringify it when
used. Remove __stringnify for all users.
This also fixes the output of:
$ ls -l /sys/module/
drwxr-xr-x 4 root root 0 2006-01-05 14:24 pcmcia
drwxr-xr-x 4 root root 0 2006-01-05 14:24 pcmcia_core
drwxr-xr-x 3 root root 0 2006-01-05 14:24 "processor"
drwxr-xr-x 3 root root 0 2006-01-05 14:24 "psmouse"
The quoting of the module names will be gone again.
Thanks to GregKH + Kay Sievers for reproting this.
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>
Diffstat (limited to 'security/capability.c')
-rw-r--r-- | security/capability.c | 6 |
1 files changed, 2 insertions, 4 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; |