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 2/5] selinuxfs cleanups - use sel_make_dir()
    Use existing sel_make_dir() helper to create booleans directory rather 
    than duplicating the logic.

    Please apply.


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

    ---

    security/selinux/selinuxfs.c | 12 ++++--------
    1 file changed, 4 insertions(+), 8 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-19 20:00:31.000000000 -0500
    +++ linux-2.6.16-rc4.w/security/selinux/selinuxfs.c 2006-02-21 02:24:08.000000000 -0500
    @@ -1235,15 +1235,11 @@ static int sel_fill_super(struct super_b
    dentry = d_alloc_name(sb->s_root, BOOL_DIR_NAME);
    if (!dentry)
    return -ENOMEM;
    +
    + ret = sel_make_dir(sb, dentry);
    + if (ret)
    + return ret;

    - inode = sel_make_inode(sb, S_IFDIR | S_IRUGO | S_IXUGO);
    - if (!inode)
    - goto out;
    - inode->i_op = &simple_dir_inode_operations;
    - inode->i_fop = &simple_dir_operations;
    - /* directory inodes start off with i_nlink == 2 (for "." entry) */
    - inode->i_nlink++;
    - d_add(dentry, inode);
    bool_dir = dentry;
    ret = sel_make_bools();
    if (ret)
    -
    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:54    [W:0.019 / U:29.620 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site