]> git.proxmox.com Git - mirror_lxc.git/commitdiff
utmp: do not set conf->need_utmp_watch if CAP_SYS_BOOT is not found
authorDavid Ward <david.ward@ll.mit.edu>
Thu, 3 May 2012 22:50:15 +0000 (00:50 +0200)
committerDaniel Lezcano <daniel.lezcano@free.fr>
Thu, 3 May 2012 22:50:15 +0000 (00:50 +0200)
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 <david.ward@ll.mit.edu>
Signed-off-by: Daniel Lezcano <dlezcano@fr.ibm.com>
src/lxc/start.c

index 7af1e371f2af2cb583eb6cfb7bfbb99fc551152d..920ff77c3fd354dcf68e740464cb97f9af44671f 100644 (file)
@@ -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;