[PATCH 4/5] selinuxfs cleanups - sel_make_bools

From: James Morris
Date: Wed Feb 22 2006 - 09:53:48 EST


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@xxxxxxxxx>
Acked-by: Stephen Smalley <sds@xxxxxxxxxxxxx>


---
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@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/