From: Christian Brauner Date: Mon, 9 Mar 2020 09:14:34 +0000 (+0100) Subject: attach: use logging helpers when handling no new privileges X-Git-Tag: lxc-4.0.0~42^2~6 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=02d3b72b3f6a1882a19e9d59f07e4117c0731646;p=thirdparty%2Flxc.git attach: use logging helpers when handling no new privileges Signed-off-by: Christian Brauner --- diff --git a/src/lxc/attach.c b/src/lxc/attach.c index 32a932070..9ccbf77be 100644 --- a/src/lxc/attach.c +++ b/src/lxc/attach.c @@ -603,17 +603,13 @@ static bool no_new_privs(struct lxc_container *c, lxc_attach_options_t *options) __do_free char *val = NULL; /* Remove current setting. */ - if (!c->set_config_item(c, "lxc.no_new_privs", "")) { - INFO("Failed to unset lxc.no_new_privs"); - return false; - } + if (!c->set_config_item(c, "lxc.no_new_privs", "")) + return log_info(false, "Failed to unset lxc.no_new_privs"); /* Retrieve currently active setting. */ val = c->get_running_config_item(c, "lxc.no_new_privs"); - if (!val) { - INFO("Failed to retrieve lxc.no_new_privs"); - return false; - } + if (!val) + return log_info(false, "Failed to retrieve lxc.no_new_privs"); /* Set currently active setting. */ return c->set_config_item(c, "lxc.no_new_privs", val);