lkml.org 
[lkml]   [2004]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 2/3] minor cleanups in capability.c
    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@vger.kernel.org
    More majordomo info at http://vger.kernel.org/majordomo-info.html
    Please read the FAQ at http://www.tux.org/lkml/
    \
     
     \ /
      Last update: 2005-03-22 14:03    [W:2.920 / U:0.016 seconds]
    ©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site