| 1 |
# This derives from the global common config |
| 2 |
lxc.include = @LXCTEMPLATECONFIG@/common.conf |
| 3 |
|
| 4 |
# Doesn't support consoles in /dev/lxc/ |
| 5 |
lxc.tty.dir = |
| 6 |
|
| 7 |
# Extra cgroup device access |
| 8 |
## rtc |
| 9 |
lxc.cgroup2.devices.allow = c 254:0 rm |
| 10 |
## tun |
| 11 |
lxc.cgroup2.devices.allow = c 10:200 rwm |
| 12 |
## hpet |
| 13 |
lxc.cgroup2.devices.allow = c 10:228 rwm |
| 14 |
## kvm |
| 15 |
lxc.cgroup2.devices.allow = c 10:232 rwm |
| 16 |
## To use loop devices, copy the following line to the container's |
| 17 |
## configuration file (uncommented). |
| 18 |
#lxc.cgroup2.devices.allow = b 7:* rwm |
| 19 |
|
| 20 |
# mount /dev/shm as tmpfs |
| 21 |
lxc.mount.entry = none dev/shm tmpfs rw,nosuid,nodev,create=dir |
| 22 |
|
| 23 |
# Capabilities |
| 24 |
# Uncomment these if you don't run anything that needs the capability, and |
| 25 |
# would like the container to run with less privilege. |
| 26 |
# Note that some are already dropped in common.conf. |
| 27 |
# |
| 28 |
# Dropping sys_admin disables container root from doing a lot of things |
| 29 |
# that could be bad like re-mounting lxc fstab entries rw for example, |
| 30 |
# but also disables some useful things like being able to nfs mount, and |
| 31 |
# things that are already namespaced with ns_capable() kernel checks, like |
| 32 |
# hostname(1). |
| 33 |
# |
| 34 |
# Some of these don't apply in Slackware but are here for future reference. |
| 35 |
# |
| 36 |
# lxc.cap.drop = sys_admin # breaks systemd |
| 37 |
# lxc.cap.drop = net_raw # breaks dhcp/ping |
| 38 |
# lxc.cap.drop = setgid # breaks login (initgroups/setgroups) |
| 39 |
# lxc.cap.drop = dac_read_search # breaks login (pam unix_chkpwd) |
| 40 |
# lxc.cap.drop = setuid # breaks sshd,nfs statd |
| 41 |
# lxc.cap.drop = audit_control # breaks sshd (set_loginuid failed) |
| 42 |
# lxc.cap.drop = audit_write |
| 43 |
# lxc.cap.drop = setpcap # breaks journald |
| 44 |
# lxc.cap.drop = sys_resource # breaks systemd |
| 45 |
# |
| 46 |
lxc.cap.drop = mknod setfcap setpcap |