summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
9a6f83d)
pivot_root(2) man page recommend calling chdir(/), so do it
Signed-off-by: Etienne CHAMPETIER <champetier.etienne@gmail.com>
ERROR("pivot_root failed: %s\n", strerror(errno));
return -1;
}
ERROR("pivot_root failed: %s\n", strerror(errno));
return -1;
}
+ if (chdir("/")) {
+ ERROR("chdir(/) failed: %s\n", strerror(errno));
+ return -1;
+ }
snprintf(dirbuf, sizeof(dirbuf), "/old%s", jail_root);
rmdir(dirbuf);
snprintf(dirbuf, sizeof(dirbuf), "/old%s", jail_root);
rmdir(dirbuf);