]> git.sur5r.net Git - openldap/commitdiff
slight change to chdir/chroot commit to clean up perror args
authorKurt Zeilenga <kurt@openldap.org>
Mon, 9 Oct 2000 23:38:30 +0000 (23:38 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 9 Oct 2000 23:38:30 +0000 (23:38 +0000)
servers/slapd/main.c

index ccf2f93c0418ab679332709ba215feedff430962..f729ec6377579fae554cb11cba8e5b19781b1e21 100644 (file)
@@ -301,10 +301,17 @@ int main( int argc, char **argv )
        }
 
 #if defined(HAVE_CHROOT)
-       if ( sandbox && chdir( sandbox ) && chroot( sandbox ) ) {
-               perror("chroot");
-               rc = 1;
-               goto stop;
+       if ( sandbox ) {
+               if ( chdir( sandbox ) ) {
+                       perror("chdir");
+                       rc = 1;
+                       goto stop;
+               }
+               if ( chroot( sandbox ) ) {
+                       perror("chroot");
+                       rc = 1;
+                       goto stop;
+               }
        }
 #endif