From 79cce59ad46fbe0c1d6a9c47183caa992710fdfb Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Tue, 13 Jan 2015 18:23:16 +0000 Subject: [PATCH] Fix insecure chroot (coverity) --- servers/slapd/main.c | 5 +++++ 1 file changed, 5 insertions(+) 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 -- 2.39.5