# Created 2010-12-15 19:35:16.736972336+11:00
# Created 2010-12-15 17:34:27.218509994+11:00 (template)
lxc.utsname = proud
lxc.console = /var/log/lxc/proud.console
lxc.rootfs = /srv/lxc/proud
lxc.tty = 4
lxc.pts = 1024

lxc.network.type = veth
lxc.network.link = br-managed
lxc.network.name = managed
lxc.network.flags = up

lxc.cgroup.memory.limit_in_bytes = 256M
lxc.cgroup.memory.memsw.limit_in_bytes = 1G
lxc.cgroup.devices.deny = a
lxc.cgroup.devices.allow = c 1:3 rwm
lxc.cgroup.devices.allow = c 1:5 rwm
lxc.cgroup.devices.allow = c 1:8 rwm
lxc.cgroup.devices.allow = c 1:9 rwm
lxc.cgroup.devices.allow = c 4:* rwm
lxc.cgroup.devices.allow = c 5:0 rwm
lxc.cgroup.devices.allow = c 5:1 rwm
lxc.cgroup.devices.allow = c 5:2 rwm
lxc.cgroup.devices.allow = c 136:* rwm
lxc.cgroup.devices.allow = c 254:0 rm

# Prevent container from using mount(8), esp. remounting its root filesystem -oro.
# This necessitates mounting *at least* /proc outside.
lxc.cap.drop = sys_admin
lxc.mount.entry  = none /srv/lxc/proud/dev/shm tmpfs nosuid,nodev
lxc.mount.entry  = none /srv/lxc/proud/lib/init/rw tmpfs mode=0755,nosuid,size=8m
lxc.mount.entry  = none /srv/lxc/proud/proc proc nodev,noexec,nosuid
#lxc.mount.entry = none /srv/lxc/proud/proc/sys/fs/binfmt_misc binfmt_misc nodev,noexec,nosuid
#lxc.mount.entry = none /srv/lxc/proud/sys sysfs nodev,noexec,nosuid
#lxc.mount.entry = none /srv/lxc/proud/sys/fs/fuse/connections fusectl defaults
#lxc.mount.entry = none /srv/lxc/proud/sys/kernel/debug debugfs defaults
#lxc.mount.entry = none /srv/lxc/proud/sys/kernel/security securityfs defaults
lxc.mount.entry  = none /srv/lxc/proud/tmp tmpfs defaults
lxc.mount.entry  = none /srv/lxc/proud/var/lock tmpfs nodev,noexec,nosuid,size=8m
# This mount would break lxc-start's halt/reboot autodetection (in lxc 0.7.x).
#lxc.mount.entry  = none /srv/lxc/proud/var/run tmpfs mode=0755,nosuid,size=8m
# Data mountpoints
lxc.mount.entry  = /srv/mirror /srv/lxc/proud/srv/mirror none bind,ro
lxc.mount.entry  = /home       /srv/lxc/proud/home       none bind
lxc.mount.entry  = /dev/omega/squid /srv/lxc/proud/var/spool/squid ext4 defaults

# Disabled because their absence causes problems:
#chown net_admin setgid                 # getty or login
#net_bind_service net_raw net_broadcast # dhclient
#setuid                                 # rsyslog
#sys_chroot                             # openssh-server
#fowner dac_override dac_read_search    # lots of things (like root_squash)
#kill                                   # needed by default to stop rsyslogd/slapd
# Disabled because I *think* they're harmless:
#fsetid ipc_lock ipc_owner lease sys_nice sys_ptrace
lxc.cap.drop = audit_control audit_write linux_immutable mac_admin
lxc.cap.drop = mac_override mknod setfcap setpcap sys_admin sys_boot
lxc.cap.drop = sys_module sys_pacct sys_rawio sys_resource sys_time
lxc.cap.drop = sys_tty_config
