From 0189c35b6ada3ecf049f56c12d922ce007849379 Mon Sep 17 00:00:00 2001 From: Kurt Zeilenga Date: Mon, 9 Oct 2000 23:35:57 +0000 Subject: [PATCH] Do a chdir() to the sandbox dir to ensure CWD is within sandbox. --- servers/slapd/main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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; -- 2.39.5