From: <ssm...@us...> - 2008-03-20 20:01:15
|
Revision: 2853 http://selinux.svn.sourceforge.net/selinux/?rev=2853&view=rev Author: ssmalley Date: 2008-03-20 11:59:05 -0700 (Thu, 20 Mar 2008) Log Message: ----------- Author: Stephen Smalley Email: sd...@ty... Subject: libselinux: don't warn about failed selinuxfs mount if selinux disabled Date: Wed, 19 Mar 2008 09:12:20 -0400 Do not warn about a failed mount of selinuxfs if selinux was disabled in the kernel (either at compile-time or at boot via selinux=0). Based on a diff in the Debian libselinux package, reformatted for coding style. Signed-off-by: Stephen Smalley <sd...@ty...> Modified Paths: -------------- trunk/libselinux/src/load_policy.c Modified: trunk/libselinux/src/load_policy.c =================================================================== --- trunk/libselinux/src/load_policy.c 2008-03-18 20:36:20 UTC (rev 2852) +++ trunk/libselinux/src/load_policy.c 2008-03-20 18:59:05 UTC (rev 2853) @@ -369,8 +369,11 @@ * commandline enforcing setting. */ *enforce = 0; + } else { + /* Only emit this error if selinux was not disabled */ + fprintf(stderr, "Mount failed for selinuxfs on %s: %s\n", SELINUXMNT, strerror(errno)); } - fprintf(stderr, "Mount failed for selinuxfs on %s: %s\n", SELINUXMNT, strerror(errno)); + goto noload; } set_selinuxmnt(SELINUXMNT); This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |