[Pkg-sysvinit-commits] r1387 - in sysvinit/trunk/debian: . patches

Petter Reinholdtsen pere at alioth.debian.org
Wed Jul 8 15:31:11 UTC 2009


Author: pere
Date: 2009-07-08 15:31:10 +0000 (Wed, 08 Jul 2009)
New Revision: 1387

Modified:
   sysvinit/trunk/debian/changelog
   sysvinit/trunk/debian/patches/40_selinux.dpatch
Log:
Modify 40_selinux patch to avoid aborting if a SE policy is already
loaded in the initrd.  Patch from Bill Nottingham and Fedora.

Modified: sysvinit/trunk/debian/changelog
===================================================================
--- sysvinit/trunk/debian/changelog	2009-07-08 15:21:37 UTC (rev 1386)
+++ sysvinit/trunk/debian/changelog	2009-07-08 15:31:10 UTC (rev 1387)
@@ -44,6 +44,8 @@
     show up. Patch from Bill Nottingham and Fedora.
   * New patch 95_halt-name fixing halt/reboot to work properly when used
     as login shells.  Dale R. Worley and Fedora.
+  * Modify 40_selinux patch to avoid aborting if a SE policy is already
+    loaded in the initrd.  Patch from Bill Nottingham and Fedora.
 
  -- Petter Reinholdtsen <pere at debian.org>  Wed, 01 Jul 2009 20:04:20 +0200
 

Modified: sysvinit/trunk/debian/patches/40_selinux.dpatch
===================================================================
--- sysvinit/trunk/debian/patches/40_selinux.dpatch	2009-07-08 15:21:37 UTC (rev 1386)
+++ sysvinit/trunk/debian/patches/40_selinux.dpatch	2009-07-08 15:31:10 UTC (rev 1387)
@@ -2,10 +2,13 @@
 ## 40_selinux.dpatch by Manoj Srivastava <srivasta at debian.org>
 ##
 ## All lines beginning with `## DP:' are a description of the patch.
-## DP: Add Selinux capabilities
+## DP: Add Selinux capabilities.
 
+Modified based on Fedora patch from Bill Nottingham to avoid aborting
+if the SE policy was loaded in the initrd.  See
+<URL:https://bugzilla.redhat.com/show_bug.cgi?id=431113> for details.
+
 @DPATCH@
- 
 diff -uBbwr sysvinit-2.86.ds1.orig/src/init.c sysvinit-2.86.ds1/src/init.c
 --- sysvinit-2.86.ds1.orig/src/init.c	2006-10-19 14:57:57.000000000 -0500
 +++ sysvinit-2.86.ds1/src/init.c	2006-10-19 15:15:17.000000000 -0500
@@ -34,7 +37,7 @@
  	}
  
 +#ifdef WITH_SELINUX
-+  	if (getenv("SELINUX_INIT") == NULL) {
++  	if (getenv("SELINUX_INIT") == NULL && !is_selinux_enabled()) {
 +	  putenv("SELINUX_INIT=YES");
 +	  if (selinux_init_load_policy(&enforce) == 0 ) {
 +	    execv(myname, argv);




More information about the Pkg-sysvinit-commits mailing list