lkml.org 
[lkml]   [2006]   [Feb]   [22]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[PATCH 4/5] selinuxfs cleanups - sel_make_bools
    Remove the call to sel_make_bools() from sel_fill_super(), as policy needs 
    to be loaded before the boolean files can be created. Policy will never
    be loaded during sel_fill_super() as selinuxfs is kernel mounted during
    init and the only means to load policy is via selinuxfs.

    Also, the call to d_genocide() on the error path of sel_make_bools() is
    incorrect and replaced with sel_remove_bools().

    Please apply.


    Signed-off-by: James Morris <jmorris@namei.org>
    Acked-by: Stephen Smalley <sds@tycho.nsa.gov>


    ---
    security/selinux/selinuxfs.c | 5 +----
    1 file changed, 1 insertion(+), 4 deletions(-)

    diff -purN -X dontdiff linux-2.6.16-rc4.p/security/selinux/selinuxfs.c linux-2.6.16-rc4.w/security/selinux/selinuxfs.c
    --- linux-2.6.16-rc4.p/security/selinux/selinuxfs.c 2006-02-21 19:56:52.000000000 -0500
    +++ linux-2.6.16-rc4.w/security/selinux/selinuxfs.c 2006-02-21 20:33:28.000000000 -0500
    @@ -987,7 +987,7 @@ out:
    return ret;
    err:
    kfree(values);
    - d_genocide(dir);
    + sel_remove_bools(dir);
    ret = -ENOMEM;
    goto out;
    }
    @@ -1243,9 +1243,6 @@ static int sel_fill_super(struct super_b
    goto err;

    bool_dir = dentry;
    - ret = sel_make_bools();
    - if (ret)
    - goto err;

    dentry = d_alloc_name(sb->s_root, NULL_FILE_NAME);
    if (!dentry) {
    -
    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: 2006-02-22 15:58    [W:0.024 / U:1.092 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site