Merge pull request #64 from symphorien/fix-system

symlink /bin to /usr/bin
This commit is contained in:
Matthew Bauer 2020-07-23 11:08:09 -05:00 committed by GitHub
commit 5caec2e85a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -207,6 +207,11 @@ int main(int argc, char *argv[]) {
err_exit("mount(%s, %s)", usrdir, path_buf);
}
snprintf(path_buf, sizeof(path_buf), "%s/bin", rootdir);
if (symlink("/usr/bin", path_buf) < 0) {
err_exit("symlink(/usr/bin, %s)", path_buf);
}
// fixes issue #1 where writing to /proc/self/gid_map fails
// see user_namespaces(7) for more documentation
int fd_setgroups = open("/proc/self/setgroups", O_WRONLY);