From: Howard Chu Date: Tue, 13 Jan 2015 18:23:16 +0000 (+0000) Subject: Fix insecure chroot (coverity) X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=79cce59ad46fbe0c1d6a9c47183caa992710fdfb;p=openldap Fix insecure chroot (coverity) --- diff --git a/servers/slapd/main.c b/servers/slapd/main.c index f975df8e41..557ed6bfe5 100644 --- a/servers/slapd/main.c +++ b/servers/slapd/main.c @@ -757,6 +757,11 @@ unhandled_option:; rc = 1; goto stop; } + if ( chdir( "/" ) ) { + perror("chdir"); + rc = 1; + goto stop; + } } #endif