Open benwbooth opened 8 years ago
After I run nix-user-chroot, I can no longer use sudo:
sudo: /usr/bin/sudo must be owned by uid 0 and have the setuid bit set
This is what sudo looks like within the chroot:
-rwsr-xr-x 1 nobody nogroup 155008 Feb 10 2014 /usr/bin/sudo*
This is what it looks like outside the chroot:
-rwsr-xr-x 1 root root 155008 Feb 10 2014 /usr/bin/sudo*
The following lines from main.c only seem to be remapping the current uid/gid and not all the other ones:
main.c
// map the original uid/gid in the new ns snprintf(map_buf, sizeof(map_buf), "%d %d 1", uid, uid); update_map(map_buf, "/proc/self/uid_map"); snprintf(map_buf, sizeof(map_buf), "%d %d 1", gid, gid); update_map(map_buf, "/proc/self/gid_map");
Would it be possible to map all uid/guis in the chroot, not just the current user's?
After I run nix-user-chroot, I can no longer use sudo:
This is what sudo looks like within the chroot:
This is what it looks like outside the chroot:
The following lines from
main.c
only seem to be remapping the current uid/gid and not all the other ones:Would it be possible to map all uid/guis in the chroot, not just the current user's?