From ef51582b6e28963c1717e060eaa67560b625e19b Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 9 Oct 2000 23:38:30 +0000 Subject: [PATCH] slight change to chdir/chroot commit to clean up perror args --- servers/slapd/main.c | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/servers/slapd/main.c b/servers/slapd/main.c index ccf2f93c04..f729ec6377 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -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 -- 2.39.5