tools/lxc-ls: fix logic for unpriv containers

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
This commit is contained in:
Christian Brauner 2018-02-07 21:06:01 +01:00
parent ff5976cd54
commit f71634fcc9
No known key found for this signature in database
GPG Key ID: 8EB056D53EECB12D

View File

@ -506,13 +506,13 @@ static int ls_get(struct ls **m, size_t *size, const struct lxc_arguments *args,
l->swap = ls_get_swap(c);
val = c->get_running_config_item(c, "lxc.idmap");
l->unprivileged = (val == NULL);
l->unprivileged = !(val == NULL);
free(val);
} else {
int ret;
ret = c->get_config_item(c, "lxc.idmap", NULL, 0);
l->unprivileged = (ret == 0);
l->unprivileged = !(ret == 0);
}
}