From f51db2b39a5006ed74271ffd0b46cbbc27d7bf0b Mon Sep 17 00:00:00 2001 From: David Ward Date: Fri, 4 May 2012 00:50:15 +0200 Subject: [PATCH] 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 --- src/lxc/start.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) 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; -- 2.47.2