Skip to content

Commit

Permalink
small sandbox fix
Browse files Browse the repository at this point in the history
  • Loading branch information
peterebden committed Mar 20, 2019
1 parent b857051 commit fa90aca
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
13.5.0-beta3
13.5.0-beta4
7 changes: 4 additions & 3 deletions tools/sandbox/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,6 @@ int mount_tmp() {
fputs("Not mounting tmpfs on /tmp since TMP_DIR is a subdir\n", stderr);
return 0;
}
} else {
fputs("TMP_DIR not set, will not bind-mount to /tmp/plz_sandbox\n", stderr);
return 0;
}
// Remounting / as private is necessary so that the tmpfs mount isn't visible to anyone else.
if (mount("none", "/", NULL, MS_REC | MS_PRIVATE, NULL) != 0) {
Expand All @@ -112,6 +109,10 @@ int mount_tmp() {
perror("setenv");
return 1;
}
if (!dir) {
fputs("TMP_DIR not set, will not bind-mount to /tmp/plz_sandbox\n", stderr);
return 0;
}
if (mkdir(d, S_IRWXU) != 0) {
perror("mkdir /tmp/plz_sandbox");
return 1;
Expand Down

0 comments on commit fa90aca

Please sign in to comment.