From: Kurt Zeilenga Date: Mon, 9 Oct 2000 23:35:57 +0000 (+0000) Subject: Do a chdir() to the sandbox dir to ensure CWD is within sandbox. X-Git-Tag: LDBM_PRE_GIANT_RWLOCK~1791 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=0189c35b6ada3ecf049f56c12d922ce007849379;p=openldap Do a chdir() to the sandbox dir to ensure CWD is within sandbox. --- diff --git a/servers/slapd/main.c b/servers/slapd/main.c index 0fc8b3072c..ccf2f93c04 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -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;