selinux/libselinux
Eric Paris b3b19fdce5 libselinux: load_policy: handle selinux=0 and /sys/fs/selinux not exist
Handle situation where selinux=0 passed to the kernel and both /selinux and
/sys/fs/selinux directories do not exist.  We used to handle selinux=0
(or kernel compile without selinux) by getting ENODEV when we tried to
mount selinuxfs on /selinux.  Now selinux=0 means that /sys/fs/selinux
won't exist and we never create the real directory /selinux at all. So
we get ENOENT instead of ENODEV.  The solution is to check to see if the
mount failure was for ENODEV and if not to check if selinuxfs exists in
/proc/filesystems at all.  If it doesn't exist, that's equivalent to
ENODEV.

Signed-off-by: Eric Paris <eparis@redhat.com>
Acked-by: Dan Walsh <dwalsh@redhat.com>
2011-11-02 15:37:10 -04:00
..
include libselinux: load_policy: handle selinux=0 and /sys/fs/selinux not exist 2011-11-02 15:37:10 -04:00
man whole tree: default make target to all not install 2011-09-16 11:54:04 -04:00
src libselinux: load_policy: handle selinux=0 and /sys/fs/selinux not exist 2011-11-02 15:37:10 -04:00
utils libselinux: utils: matchpathcon: remove duplicate declaration 2011-09-16 11:54:03 -04:00
ChangeLog Bump version and changelog for all components. 2011-09-16 15:34:36 -04:00
LICENSE initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
Makefile initial import from svn trunk revision 2950 2008-08-19 15:30:36 -04:00
VERSION Bump version and changelog for all components. 2011-09-16 15:34:36 -04:00