[patch 1/1] selinux: Disable automatic labeling of new inodes whenno policy is loaded

From: Stephen Smalley
Date: Wed Feb 22 2006 - 14:28:58 EST


This patch disables the automatic labeling of new inodes on disk
when no policy is loaded. Please apply.

Signed-off-by: Stephen Smalley <sds@xxxxxxxxxxxxx>
Acked-by: James Morris <jmorris@xxxxxxxxx>

---

security/selinux/hooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

--- linux-2.6.16-rc4-mm1/security/selinux/hooks.c 2006-02-21 14:39:53.000000000 -0500
+++ linux-2.6.16-rc4-mm1-x/security/selinux/hooks.c 2006-02-21 14:43:32.000000000 -0500
@@ -1983,7 +1983,7 @@ static int selinux_inode_init_security(s

inode_security_set_sid(inode, newsid);

- if (sbsec->behavior == SECURITY_FS_USE_MNTPOINT)
+ if (!ss_initialized || sbsec->behavior == SECURITY_FS_USE_MNTPOINT)
return -EOPNOTSUPP;

if (name) {

--
Stephen Smalley
National Security Agency

-
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/