centos.common.conf.in revision 1ecee40b7dcb933d2c9910f07ed26c6a55e18206
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Taken from the oracle.common.conf.in
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Console settings
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.devttydir = lxc
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.tty = 4
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.pts = 1024
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Mount entries
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.mount.auto = proc:mixed sys:ro
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Ensure hostname is changed on clone
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.hook.clone = @LXCHOOKDIR@/clonehostname
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Capabilities
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Uncomment these if you don't run anything that needs the capability, and
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# would like the container to run with less privilege.
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield#
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Dropping sys_admin disables container root from doing a lot of things
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# that could be bad like re-mounting lxc fstab entries rw for example,
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# but also disables some useful things like being able to nfs mount, and
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# things that are already namespaced with ns_capable() kernel checks, like
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# hostname(1).
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# lxc.cap.drop = sys_admin
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# lxc.cap.drop = net_raw # breaks dhcp/ping
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# lxc.cap.drop = setgid # breaks login (initgroups/setgroups)
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# lxc.cap.drop = dac_read_search # breaks login (pam unix_chkpwd)
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# lxc.cap.drop = setuid # breaks sshd,nfs statd
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# lxc.cap.drop = audit_control # breaks sshd (set_loginuid failed)
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# lxc.cap.drop = audit_write
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield#
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cap.drop = mac_admin mac_override setfcap setpcap
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cap.drop = sys_module sys_nice sys_pacct
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cap.drop = sys_rawio sys_time
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Control Group devices: all denied except those whitelisted
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.deny = a
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfield# Allow any mknod (but not reading/writing the node)
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c *:* m
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = b *:* m
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 1:3 rwm # /dev/null
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 1:5 rwm # /dev/zero
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 1:7 rwm # /dev/full
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 5:0 rwm # /dev/tty
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 1:8 rwm # /dev/random
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 1:9 rwm # /dev/urandom
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 136:* rwm # /dev/tty[1-4] ptys and lxc console
1ecee40b7dcb933d2c9910f07ed26c6a55e18206Michael H. Warfieldlxc.cgroup.devices.allow = c 5:2 rwm # /dev/ptmx pty master