lkml.org 
[lkml]   [2005]   [Jun]   [8]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 1/11] lsm stacking: don't default to dummy_##hook
    When stacking multiple LSMs, we do not want hooks which are undefined to
    be substituted with the dummy_##hook.

    Signed-off-by: Serge Hallyn <serue@us.ibm.com>
    ---
    security/security.c | 12 ++++++------
    1 files changed, 6 insertions(+), 6 deletions(-)

    Index: linux-2.6.12-rc6/security/security.c
    ===================================================================
    --- linux-2.6.12-rc6.orig/security/security.c
    +++ linux-2.6.12-rc6/security/security.c
    @@ -81,15 +81,15 @@ int __init security_init(void)
    */
    int register_security(struct security_operations *ops)
    {
    + if (security_ops != &dummy_security_ops)
    + return -EAGAIN;
    +
    if (verify(ops)) {
    printk(KERN_DEBUG "%s could not verify "
    "security_operations structure.\n", __FUNCTION__);
    return -EINVAL;
    }

    - if (security_ops != &dummy_security_ops)
    - return -EAGAIN;
    -
    security_ops = ops;

    return 0;
    @@ -134,9 +134,9 @@ int unregister_security(struct security_
    */
    int mod_reg_security(const char *name, struct security_operations *ops)
    {
    - if (verify(ops)) {
    - printk(KERN_INFO "%s could not verify "
    - "security operations.\n", __FUNCTION__);
    + if (!ops) {
    + printk(KERN_INFO "%s received NULL security operations",
    + __FUNCTION__);
    return -EINVAL;
    }

    -
    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-06-09 01:57    [W:0.277 / U:2.436 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site