]> git.sur5r.net Git - openldap/commitdiff
Do a chdir() to the sandbox dir to ensure CWD is within sandbox.
authorKurt Zeilenga <kurt@openldap.org>
Mon, 9 Oct 2000 23:35:57 +0000 (23:35 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 9 Oct 2000 23:35:57 +0000 (23:35 +0000)
servers/slapd/main.c

index 0fc8b3072c552b10e3532f79c95ded24f9f0d113..ccf2f93c0418ab679332709ba215feedff430962 100644 (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;