]> 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)
committerHoward Chu <hyc@openldap.org>
Tue, 13 Jan 2015 18:23:16 +0000 (18:23 +0000)
servers/slapd/main.c

index f975df8e41922790170008130b7fdae6a7f1b915..557ed6bfe52bc0736e17b0848453986dbf906be4 100644 (file)
@@ -757,6 +757,11 @@ unhandled_option:;
                        rc = 1;
                        goto stop;
                }
+               if ( chdir( "/" ) ) {
+                       perror("chdir");
+                       rc = 1;
+                       goto stop;
+               }
        }
 #endif