Skip to content

Commit

Permalink
fix busybox template for use with AppArmor
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Dwight Engen authored and hallyn committed Oct 17, 2013
1 parent c944b92 commit fefddf9
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion templates/lxc-busybox.in
Expand Up @@ -37,6 +37,7 @@ $rootfs/usr/bin \
$rootfs/sbin \
$rootfs/usr/sbin \
$rootfs/proc \
$rootfs/sys \
$rootfs/mnt \
$rootfs/tmp \
$rootfs/var/log \
Expand Down Expand Up @@ -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

Expand Down Expand Up @@ -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()
Expand Down

0 comments on commit fefddf9

Please sign in to comment.