[PATCH 2/3] minor cleanups in capability.c
From: Chris Wright
Date: Tue May 11 2004 - 19:00:51 EST
Remove confusing error message when loading as secondary module, and
ditch conditional MY_NAME macro.
--- linus-2.5/security/capability.c~verbose 2004-05-11 15:44:11.651038464 -0700
+++ linus-2.5/security/capability.c 2004-05-11 16:02:25.144802144 -0700
@@ -47,11 +47,7 @@
.vm_enough_memory = cap_vm_enough_memory,
};
-#if defined(CONFIG_SECURITY_CAPABILITIES_MODULE)
-#define MY_NAME THIS_MODULE->name
-#else
-#define MY_NAME "capability"
-#endif
+#define MY_NAME __stringify(KBUILD_MODNAME)
/* flag to keep track of how we were registered */
static int secondary;
@@ -61,8 +57,6 @@
{
/* register ourselves with the security framework */
if (register_security (&capability_ops)) {
- printk (KERN_INFO
- "Failure registering capabilities with the kernel\n");
/* try registering with primary module */
if (mod_reg_security (MY_NAME, &capability_ops)) {
printk (KERN_INFO "Failure registering capabilities "
@@ -71,7 +65,8 @@
}
secondary = 1;
}
- printk (KERN_INFO "Capability LSM initialized\n");
+ printk (KERN_INFO "Capability LSM initialized%s\n",
+ secondary ? " as secondary" : "");
return 0;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/