We'll recommend to use "chroot /" to explicitly disable chroot, however
there might be configurations where it would cause problems to just issue
the syscall (typically some hardened containers), so let's make sure that
"chroot /" is a nop in this case.
DISGUISE(rmdir(tmpdir));
if (!error)
error = chroot(".");
- } else {
+ } else if (strcmp(path, "/") != 0) {
error = chroot(path);
}
if (!error)