kernel-ark/security/selinux
Stephen Smalley 8aad38752e [PATCH] selinux: Disable automatic labeling of new inodes when no policy is loaded
This patch disables the automatic labeling of new inodes on disk
when no policy is loaded.

Discussion is here:
https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=180296

In short, we're changing the behavior so that when no policy is loaded,
SELinux does not label files at all.  Currently it does add an 'unlabeled'
label in this case, which we've found causes problems later.

SELinux always maintains a safe internal label if there is none, so with this
patch, we just stick with that and wait until a policy is loaded before adding
a persistent label on disk.

The effect is simply that if you boot with SELinux enabled but no policy
loaded and create a file in that state, SELinux won't try to set a security
extended attribute on the new inode on the disk.  This is the only sane
behavior for SELinux in that state, as it cannot determine the right label to
assign in the absence of a policy.  That state usually doesn't occur, but the
rawhide installer seemed to be misbehaving temporarily so it happened to show
up on a test install.

Signed-off-by:  Stephen Smalley <sds@tycho.nsa.gov>
Acked-by: James Morris <jmorris@namei.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
2006-03-22 07:54:06 -08:00
..
include [SELINUX]: selinux_socket_getpeer_{stream,dgram} fixup 2006-03-20 22:49:00 -08:00
ss [PATCH] selinux: Remove unneeded k[cm]alloc() return value casts 2006-01-10 08:02:02 -08:00
avc.c [PATCH] selinux: require AUDIT 2006-02-07 16:12:33 -08:00
hooks.c [PATCH] selinux: Disable automatic labeling of new inodes when no policy is loaded 2006-03-22 07:54:06 -08:00
Kconfig [PATCH] selinux: require AUDIT 2006-02-07 16:12:33 -08:00
Makefile [PATCH] selinux: require SECURITY_NETWORK 2006-02-05 11:06:52 -08:00
netif.c
netlink.c
nlmsgtab.c [IPSEC]: Sync series - update selinux 2006-03-20 19:17:39 -08:00
selinuxfs.c [PATCH] shrink dentry struct 2006-01-08 20:13:58 -08:00
xfrm.c [SECURITY]: TCP/UDP getpeersec 2006-03-20 22:41:23 -08:00