Skip to content

Commit

Permalink
Try to fix rootless.c
Browse files Browse the repository at this point in the history
  • Loading branch information
Moe-hacker committed May 30, 2024
1 parent bbb8f6d commit 38b2f1c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rootless.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,9 @@ void run_rootless_container(struct CONTAINER *container)
// Maybe needless.
setuid(0);
setgid(0);
setgroups_fd = open("/proc/self/setgroups", O_RDWR | O_CLOEXEC);
write(setgroups_fd, "allow", 5);
close(setgroups_fd);
// Init rootless container.
init_rootless_container(container);
run_rootless_chroot_container(container);
Expand Down

0 comments on commit 38b2f1c

Please sign in to comment.