linux-stable-rt/security/selinux
Eric Paris 383795c206 SELinux: /proc/mounts should show what it can
Given a hosed SELinux config in which a system never loads policy or
disables SELinux we currently just return -EINVAL for anyone trying to
read /proc/mounts.  This is a configuration problem but we can certainly
be more graceful.  This patch just ignores -EINVAL when displaying LSM
options and causes /proc/mounts display everything else it can.  If
policy isn't loaded the obviously there are no options, so we aren't
really loosing any information here.

This is safe as the only other return of EINVAL comes from
security_sid_to_context_core() in the case of an invalid sid.  Even if a
FS was mounted with a now invalidated context that sid should have been
remapped to unlabeled and so we won't hit the EINVAL and will work like
we should.  (yes, I tested to make sure it worked like I thought)

Signed-off-by: Eric Paris <eparis@redhat.com>
Tested-by: Marc Dionne <marc.c.dionne@gmail.com>
Signed-off-by: James Morris <jmorris@namei.org>
2008-07-30 08:31:28 +10:00
..
include Revert "SELinux: allow fstype unknown to policy to use xattrs if present" 2008-07-15 18:32:49 +10:00
ss Revert "SELinux: allow fstype unknown to policy to use xattrs if present" 2008-07-15 18:32:49 +10:00
Kconfig
Makefile
avc.c
exports.c
hooks.c SELinux: /proc/mounts should show what it can 2008-07-30 08:31:28 +10:00
netif.c
netlabel.c
netlink.c
netnode.c SELinux: keep the code clean formating and syntax 2008-07-14 15:01:36 +10:00
netport.c SELinux: keep the code clean formating and syntax 2008-07-14 15:01:36 +10:00
nlmsgtab.c
selinuxfs.c SELinux: more user friendly unknown handling printk 2008-07-14 15:02:00 +10:00
xfrm.c