Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
static int set_config_no_new_privs(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data)
{
static int set_config_no_new_privs(const char *key, const char *value,
struct lxc_conf *lxc_conf, void *data)
{
unsigned int v;
if (lxc_config_value_empty(value)) {
unsigned int v;
if (lxc_config_value_empty(value)) {
- if (lxc_safe_uint(value, &v) < 0)
- return -1;
+ ret = lxc_safe_uint(value, &v);
+ if (ret < 0)
+ return ret;
+ return ret_errno(EINVAL);
lxc_conf->no_new_privs = v ? true : false;
lxc_conf->no_new_privs = v ? true : false;