attach: always drop supplementary groups

Closes #1704. Signed-off-by: 's avatarChristian Brauner <christian.brauner@ubuntu.com>
parent 5eda487c
...@@ -870,11 +870,11 @@ static int attach_child_main(struct attach_clone_payload *payload) ...@@ -870,11 +870,11 @@ static int attach_child_main(struct attach_clone_payload *payload)
ret = lxc_switch_uid_gid(new_uid, new_gid); ret = lxc_switch_uid_gid(new_uid, new_gid);
if (ret < 0) if (ret < 0)
goto on_error; goto on_error;
}
ret = lxc_setgroups(0, NULL); ret = lxc_setgroups(0, NULL);
if (ret < 0) if (ret < 0)
goto on_error; goto on_error;
}
if ((init_ctx->container && init_ctx->container->lxc_conf && if ((init_ctx->container && init_ctx->container->lxc_conf &&
init_ctx->container->lxc_conf->no_new_privs) || init_ctx->container->lxc_conf->no_new_privs) ||
......
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