container-base.in revision 4845c17aff570c25e05c5347dfdcd577cb108d47
7c7a19761235efff584ee65a1c6dc4aa1735ff64Eugen Kuksa # dbus, signal, ptrace and unix are only supported by recent apparmor
696ecfbf968bc780c60af3e5a01691be7fa6792bEugen Kuksa # versions. Comment them if the apparmor parser doesn't recognize them.
696ecfbf968bc780c60af3e5a01691be7fa6792bEugen Kuksa # This also needs additional rules to reach outside of the container via
696ecfbf968bc780c60af3e5a01691be7fa6792bEugen Kuksa # DBus, so just let all of DBus within the container.
696ecfbf968bc780c60af3e5a01691be7fa6792bEugen Kuksa # Allow us to receive signals from anywhere. Note: if per-container profiles
696ecfbf968bc780c60af3e5a01691be7fa6792bEugen Kuksa # are supported, for container isolation this should be changed to something
# signal (receive) peer=/usr/bin/lxc-start,
# allow bind mount of /lib/init/fstab for lxcguest
# allow bind mounts of /run/{,lock} to /var/run/{,lock}
mount options=(rw, bind) /run/ -> /var/run/,
# deny writes in /proc/sys/fs but allow binfmt_misc to be mounted
mount fstype=binfmt_misc -> /proc/sys/fs/binfmt_misc/,
deny @{PROC}/sys/fs/** wklx,
mount fstype=efivarfs -> /sys/firmware/efi/efivars/,
# deny writes in /sys except for /sys/fs/cgroup, also allow
mount fstype=fusectl -> /sys/fs/fuse/connections/,
mount fstype=securityfs -> /sys/kernel/security/,
mount fstype=debugfs -> /sys/kernel/debug/,
deny mount fstype=debugfs -> /var/lib/ureadahead/debugfs/,
deny /sys/firmware/efi/efivars/** rwklx,
deny /sys/kernel/security/** rwklx,
mount options=(ro, nosuid, nodev, noexec, remount, strictatime) -> /sys/fs/cgroup/,
deny /sys/kernel/debug/{,**} rwklx,