aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Normand <normand@fr.ibm.com>2009-11-17 22:57:46 +0100
committerDaniel Lezcano <dlezcano@fr.ibm.com>2009-11-17 22:57:46 +0100
commitbcc23654af105f687052ca545ccd33fc92b2fe92 (patch)
tree5116d81b22e3baca745d2e52ac01028971c0ded4 /src/lxc/lxc-setcap.in
parentlxc: move setup_fs to utils.c (diff)
downloadlxc-bcc23654af105f687052ca545ccd33fc92b2fe92.tar.gz
lxc-bcc23654af105f687052ca545ccd33fc92b2fe92.tar.bz2
lxc-bcc23654af105f687052ca545ccd33fc92b2fe92.zip
add capabilities for lxc-checkpoint
add capabilities for lxc-checkpoint Signed-off-by: Michel Normand <normand@fr.ibm.com> Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
Diffstat (limited to 'src/lxc/lxc-setcap.in')
-rw-r--r--src/lxc/lxc-setcap.in8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/lxc/lxc-setcap.in b/src/lxc/lxc-setcap.in
index 19203c2..c92666d 100644
--- a/src/lxc/lxc-setcap.in
+++ b/src/lxc/lxc-setcap.in
@@ -28,10 +28,12 @@
LXC_CREATE_CAPS="cap_sys_admin"
LXC_NETSTAT_CAPS="cap_sys_admin"
LXC_INIT_CAPS="cap_sys_admin,cap_dac_override"
-LXC_UNSHARE_CAPS="cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override"
-LXC_START_CAPS="cap_fowner,cap_sys_chroot,cap_setpcap,cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override"
+LXC_COMMON_CAPS="cap_net_admin,cap_net_raw,cap_sys_admin,cap_dac_override"
+LXC_UNSHARE_CAPS=$LXC_COMMON_CAPS
+LXC_START_CAPS="$LXC_COMMON_CAPS,cap_fowner,cap_sys_chroot,cap_setpcap"
LXC_EXECUTE_CAPS=$LXC_START_CAPS
LXC_RESTART_CAPS=$LXC_START_CAPS
+LXC_CHECKPOINT_CAPS="$LXC_COMMON_CAPS,cap_sys_ptrace"
LXC_DROP_CAPS=""
@@ -48,6 +50,7 @@ lxc_setcaps()
setcap $LXC_RESTART_CAPS=ep @BINDIR@/lxc-restart
setcap $LXC_UNSHARE_CAPS=ep @BINDIR@/lxc-unshare
setcap $LXC_NETSTAT_CAPS=ep @BINDIR@/lxc-netstat
+ setcap $LXC_CHECKPOINT_CAPS=ep @BINDIR@/lxc-checkpoint
setcap $LXC_INIT_CAPS=ep @LIBEXECDIR@/lxc-init
test -e @LXCPATH@ || mkdir -p @LXCPATH@
@@ -62,6 +65,7 @@ lxc_dropcaps()
setcap -r @BINDIR@/lxc-restart
setcap -r @BINDIR@/lxc-unshare
setcap -r @BINDIR@/lxc-netstat
+ setcap -r @BINDIR@/lxc-checkpoint
setcap -r @LIBEXECDIR@/lxc-init
chmod 0755 @LXCPATH@
}