* Include limits.h in killall.c to enforce definition of PATH_MAX
* Fix sysvinit bug #29758 Linker invocation should not contain
headers. Change based on patch from Elias Pipping.
+ * Add fix for Debian bug #580272: use return value 1 of
+ is_selinux_enabled() to determine if SELinux is enabled,
+ otherwise initialize SELinux and load the policy. Patch from
+ Petter Reinholdtsen.
[ Petter Reinholdtsen ]
* Next release will be 2.89dsf.
#ifdef WITH_SELINUX
# include <selinux/selinux.h>
-# include <sys/mount.h>
-# ifndef MNT_DETACH /* present in glibc 2.10, missing in 2.7 */
-# define MNT_DETACH 2
-# endif
#endif
#ifdef __i386__
#ifdef WITH_SELINUX
if (getenv("SELINUX_INIT") == NULL) {
- const int rc = mount("proc", "/proc", "proc", 0, 0);
- if (is_selinux_enabled() > 0) {
- putenv("SELINUX_INIT=YES");
- if (rc == 0) umount2("/proc", MNT_DETACH);
+ if (is_selinux_enabled() != 1) {
if (selinux_init_load_policy(&enforce) == 0) {
+ putenv("SELINUX_INIT=YES");
execv(myname, argv);
} else {
if (enforce > 0) {
}
}
}
- if (rc == 0) umount2("/proc", MNT_DETACH);
}
#endif
/* Start booting. */