From: David Ward Date: Thu, 3 May 2012 22:50:15 +0000 (+0200) Subject: utmp: do not set conf->need_utmp_watch if CAP_SYS_BOOT is not found X-Git-Tag: lxc-0.8.0~68 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f51db2b39a5006ed74271ffd0b46cbbc27d7bf0b;p=thirdparty%2Flxc.git utmp: do not set conf->need_utmp_watch if CAP_SYS_BOOT is not found If CAP_SYS_BOOT is not found in the kernel, the existing value for conf->need_utmp_watch should be left intact (which will be '1' for containers started with 'lxc-start', or '0' for containers started with 'lxc-execute'). Signed-off-by: David Ward Signed-off-by: Daniel Lezcano --- diff --git a/src/lxc/start.c b/src/lxc/start.c index 7af1e371f..920ff77c3 100644 --- a/src/lxc/start.c +++ b/src/lxc/start.c @@ -632,8 +632,7 @@ int __lxc_start(const char *name, struct lxc_conf *conf, handler->data = data; if (must_drop_cap_sys_boot()) { - handler->conf->need_utmp_watch = 1; - DEBUG("Dropping cap_sys_boot and watching utmp\n"); + DEBUG("Dropping cap_sys_boot\n"); } else { DEBUG("Not dropping cap_sys_boot or watching utmp\n"); handler->conf->need_utmp_watch = 0;