Do a chdir() to the sandbox dir to ensure CWD is within sandbox.

This commit is contained in:
Kurt Zeilenga 2000-10-09 23:35:57 +00:00
parent b7b9148c7f
commit 0189c35b6a

View file

@ -301,7 +301,7 @@ int main( int argc, char **argv )
}
#if defined(HAVE_CHROOT)
if ( sandbox && chroot( sandbox ) ) {
if ( sandbox && chdir( sandbox ) && chroot( sandbox ) ) {
perror("chroot");
rc = 1;
goto stop;