attach: use logging helpers when handling no new privileges

parent cca66e06
...@@ -603,17 +603,13 @@ static bool no_new_privs(struct lxc_container *c, lxc_attach_options_t *options) ...@@ -603,17 +603,13 @@ static bool no_new_privs(struct lxc_container *c, lxc_attach_options_t *options)
__do_free char *val = NULL; __do_free char *val = NULL;
/* Remove current setting. */ /* Remove current setting. */
if (!c->set_config_item(c, "lxc.no_new_privs", "")) { if (!c->set_config_item(c, "lxc.no_new_privs", ""))
INFO("Failed to unset lxc.no_new_privs"); return log_info(false, "Failed to unset lxc.no_new_privs");
return false;
}
/* Retrieve currently active setting. */ /* Retrieve currently active setting. */
val = c->get_running_config_item(c, "lxc.no_new_privs"); val = c->get_running_config_item(c, "lxc.no_new_privs");
if (!val) { if (!val)
INFO("Failed to retrieve lxc.no_new_privs"); return log_info(false, "Failed to retrieve lxc.no_new_privs");
return false;
}
/* Set currently active setting. */ /* Set currently active setting. */
return c->set_config_item(c, "lxc.no_new_privs", val); return c->set_config_item(c, "lxc.no_new_privs", val);
......
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