Unverified Commit b8025217 by Christian Brauner Committed by Stéphane Graber

lxc-usernsexec: don't fail on setgroups()

We can fail to setgroups() when "deny" has been set which we need to set when we are a fully unprivileged user. Closes: 3420. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 323a1569
......@@ -87,11 +87,11 @@ static int do_child(void *vargv)
int ret;
char **argv = (char **)vargv;
/* Assume we want to become root */
if (!lxc_switch_uid_gid(0, 0))
if (!lxc_setgroups(0, NULL))
return -1;
if (!lxc_setgroups(0, NULL))
/* Assume we want to become root */
if (!lxc_switch_uid_gid(0, 0))
return -1;
ret = unshare(CLONE_NEWNS);
......
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