Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris...
[linux-2.6.git] / security / smack / smack_lsm.c
index e2d6f7c..93f5b0c 100644 (file)
@@ -2424,7 +2424,9 @@ static void smack_release_secctx(char *secdata, u32 seclen)
 {
 }
 
-static struct security_operations smack_ops = {
+struct security_operations smack_ops = {
+       .name =                         "smack",
+
        .ptrace =                       smack_ptrace,
        .capget =                       cap_capget,
        .capset_check =                 cap_capset_check,
@@ -2557,6 +2559,9 @@ static struct security_operations smack_ops = {
  */
 static __init int smack_init(void)
 {
+       if (!security_module_enable(&smack_ops))
+               return 0;
+
        printk(KERN_INFO "Smack:  Initializing.\n");
 
        /*