Research
.
Skip Search Box

SELinux Mailing List

[patch] libselinux: don't warn about failed selinuxfs mount if selinux disabled

From: Stephen Smalley <sds_at_tycho.nsa.gov>
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 <sds@tycho.nsa.gov>

---

 libselinux/src/load_policy.c | 5 ++++-  1 file changed, 4 insertions(+), 1 deletion(-)

Index: trunk/libselinux/src/load_policy.c


  • trunk/libselinux/src/load_policy.c (revision 2852) +++ trunk/libselinux/src/load_policy.c (working copy) @@ -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);
-- 
Stephen Smalley
National Security Agency


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to majordomo@tycho.nsa.gov with
the words "unsubscribe selinux" without quotes as the message.
Received on Wed 19 Mar 2008 - 09:12:23 EDT
 

Date Posted: Jan 15, 2009 | Last Modified: Jan 15, 2009 | Last Reviewed: Jan 15, 2009

 
bottom

National Security Agency / Central Security Service