]> git.sur5r.net Git - openldap/commitdiff
Fix insecure chroot (coverity)
authorHoward Chu <hyc@openldap.org>
Tue, 13 Jan 2015 18:23:16 +0000 (18:23 +0000)
committerQuanah Gibson-Mount <quanah@openldap.org>
Tue, 13 Jan 2015 19:09:09 +0000 (13:09 -0600)
servers/slapd/main.c

index c52005b23343e64a6643d7023e4b5f9121b8d938..48d126c26230acf5de1a47e26f1c5e9fefbb70b3 100644 (file)
@@ -756,6 +756,11 @@ unhandled_option:;
                        rc = 1;
                        goto stop;
                }
+               if ( chdir( "/" ) ) {
+                       perror("chdir");
+                       rc = 1;
+                       goto stop;
+               }
        }
 #endif