]> git.proxmox.com Git - mirror_lxc.git/commitdiff
fix busybox template for use with AppArmor
authorDwight Engen <dwight.engen@oracle.com>
Tue, 15 Oct 2013 17:51:14 +0000 (13:51 -0400)
committerSerge Hallyn <serge.hallyn@ubuntu.com>
Thu, 17 Oct 2013 15:18:51 +0000 (10:18 -0500)
Ensure /proc and /sys are mounted in the container, otherwise
apparmor_enabled() will fail to find
/sys/module/apparmor/parameters/enabled

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
templates/lxc-busybox.in

index 12059f70a5b196025c8492a871bb93f4edf23025..cbdaaf3ccba1f6adfbbd2b5f345abc2f334cba36 100644 (file)
@@ -37,6 +37,7 @@ $rootfs/usr/bin \
 $rootfs/sbin \
 $rootfs/usr/sbin \
 $rootfs/proc \
+$rootfs/sys \
 $rootfs/mnt \
 $rootfs/tmp \
 $rootfs/var/log \
@@ -92,7 +93,6 @@ EOF
 
     # mount points
     cat <<EOF >> $rootfs/etc/fstab
-proc  /proc      proc    defaults     0      0
 shm   /dev/shm   tmpfs   defaults     0      0
 EOF
 
@@ -278,6 +278,8 @@ EOF
             echo "lxc.mount.entry = /$dir $dir none ro,bind 0 0" >> $path/config
         fi
     done
+    echo "lxc.mount.entry = /sys/kernel/security sys/kernel/security none ro,bind 0 0" >>$path/config
+    echo "lxc.mount.auto = proc:mixed sys" >>$path/config
 }
 
 usage()