]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
selinux-loadpolicy: do not mount /proc and /selinux
authorHarald Hoyer <harald@redhat.com>
Wed, 9 Sep 2009 12:41:40 +0000 (14:41 +0200)
committerHarald Hoyer <harald@redhat.com>
Wed, 9 Sep 2009 12:41:40 +0000 (14:41 +0200)
load_policy mounts it for us

modules.d/99base/selinux-loadpolicy.sh

index 0dd296b072bf28293463f70eb43f1502a228fd2f..84b365770c9a87a2298897cd694fe2a687a3a33f 100755 (executable)
@@ -4,8 +4,7 @@
 if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ] && [ -e "$NEWROOT/etc/sysconfig/selinux" ]; then
     info "Loading SELinux policy"
     {
-    chroot "$NEWROOT" /bin/mount -t selinuxfs selinuxfs /selinux
-    chroot "$NEWROOT" /bin/mount -t proc proc  /proc
+    # load_policy does mount /proc and /selinux in libselinux,selinux_init_load_policy()
 
     if [ -x "$NEWROOT/sbin/load_policy" ]; then
         chroot "$NEWROOT" /sbin/load_policy -i 2>&1
@@ -19,6 +18,5 @@ if [ -x "$NEWROOT/usr/sbin/load_policy" -o -x "$NEWROOT/sbin/load_policy" ] && [
        sleep 100d
        exit 1
     fi
-    chroot "$NEWROOT" /bin/umount /proc
     } | vinfo
 fi