[Pkg-sysvinit-devel] Bug#349149: sysvinit: patch attached

darren darren at sardion.com
Sat Jan 21 12:11:15 UTC 2006


Package: sysvinit
Version: 2.86.ds1-6
Followup-For: Bug #349149

following is a dpatch that will fix this

-Darren

filname: 41_selinux2.dpatch

#! /bin/sh /usr/share/dpatch/dpatch-run
## 41_selinux2.dpatch by Darren Creutz

@DPATCH@
Index: trunk/src/init.c
==================================================================
--- trunk/src/init.c    (revision 35)
+++ trunk/src/init.c    (arbeidskopi)
@@ -125,15 +125,19 @@
   else if (seconfig == 1)
     *enforce = 1;
 
+  char* selinux_errstr = malloc(256 * sizeof(char));
   if (mount("none", SELINUXMNT, "selinuxfs", 0, 0) < 0) {
     if (errno == ENODEV) {
-      printf("SELinux not supported by kernel: 
%s\n",SELINUXMNT,strerror(errno) 
);
+      sprintf(selinux_errstr,"SELinux not supported by kernel: 
%s\n",SELINUXMNT 
,strerror(errno));
+      print(selinux_errstr);
       *enforce = 0;
     } else {
-      printf("Failed to mount %s: %s\n",SELINUXMNT,strerror(errno));
+      sprintf(selinux_errstr,"Failed to mount %s: 
%s\n",SELINUXMNT,strerror(err 
no));
+      print(selinux_errstr);
     }
     return ret;
   }
+  free(selinux_errstr);
 
   selinux_mnt = SELINUXMNT; /* set manually since we mounted it */
 




-- System Information:
Debian Release: testing/unstable
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.6.15
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)

Versions of packages sysvinit depends on:
ii  coreutils                     5.93-5     The GNU core utilities
ii  initscripts                   2.86.ds1-6 Standard scripts needed for bootin
ii  libc6                         2.3.5-12   GNU C Library: Shared libraries an
ii  libselinux1                   1.28-2     SELinux shared libraries
ii  libsepol1                     1.10-1     Security Enhanced Linux policy lib
ii  sysv-rc                       2.86.ds1-6 Standard boot mechanism using syml

sysvinit recommends no packages.

-- no debconf information




More information about the Pkg-sysvinit-devel mailing list