Commit f51db2b3 by David Ward Committed by Daniel Lezcano

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: 's avatarDavid Ward <david.ward@ll.mit.edu> Signed-off-by: 's avatarDaniel Lezcano <dlezcano@fr.ibm.com>
parent 631c07d4
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment