on master help sign in
Merge pull request #64 from symphorien/fix-system
5caec2eMatthew Bauer
@@ -207,6 +207,11 @@ int main(int argc, char *argv[]) {
207 err_exit("mount(%s, %s)", usrdir, path_buf);
207 err_exit("mount(%s, %s)", usrdir, path_buf);
208 }
208 }
209
209
210+ snprintf(path_buf, sizeof(path_buf), "%s/bin", rootdir);
211+ if (symlink("/usr/bin", path_buf) < 0) {
212+ err_exit("symlink(/usr/bin, %s)", path_buf);
213+ }
214+
210 // fixes issue #1 where writing to /proc/self/gid_map fails
215 // fixes issue #1 where writing to /proc/self/gid_map fails
211 // see user_namespaces(7) for more documentation
216 // see user_namespaces(7) for more documentation
212 int fd_setgroups = open("/proc/self/setgroups", O_WRONLY);
217 int fd_setgroups = open("/proc/self/setgroups", O_WRONLY);