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

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

Signed-off-by:  Stephen Smalley <[email protected]>
Acked-by: James Morris <[email protected]>

---

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

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux