[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] disable SELinux on failed selinuxfs mount in loader



We should disable SELinux if selinuxfs couldn't be mounted.

Patch attached.
-- 
Matt Wilson
rpath, Inc.
msw rpath com
Index: anaconda
===================================================================
RCS file: /usr/local/CVS/anaconda/anaconda,v
retrieving revision 1.351
diff -u -r1.351 anaconda
--- anaconda	19 Aug 2005 20:02:32 -0000	1.351
+++ anaconda	25 Aug 2005 00:58:35 -0000
@@ -8,8 +8,8 @@
 # Mike Fulbright <msf redhat com>
 # Jakub Jelinek <jakub redhat com>
 # Jeremy Katz <katzj redhat com>
-# Erik Troan <ewt redhat com>
-# Matt Wilson <msw specifixinc com>
+# Erik Troan <ewt rpath com>
+# Matt Wilson <msw rpath com>
 #
 # ... And many others
 #
Index: loader2/loader.c
===================================================================
RCS file: /usr/local/CVS/anaconda/loader2/loader.c,v
retrieving revision 1.160
diff -u -r1.160 loader.c
--- loader2/loader.c	17 Aug 2005 15:06:40 -0000	1.160
+++ loader2/loader.c	25 Aug 2005 00:58:36 -0000
@@ -1368,7 +1368,8 @@
      * (if we're using SELinux) */
     if (FL_SELINUX(flags)) {
         if (mount("/selinux", "/selinux", "selinuxfs", 0, NULL)) {
-            logMessage(ERROR, "failed to mount /selinux: %s", strerror(errno));
+            logMessage(ERROR, "failed to mount /selinux: %s, disabling SELinux", strerror(errno));
+	    flags &= ~LOADER_FLAGS_SELINUX;
         } else {
             /* FIXME: this is a bad hack for libselinux assuming things
              * about paths */

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]