]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/config.c
Import resetting of c_dn/c_cdn after anonymous bind.
[openldap] / servers / slapd / back-ldbm / config.c
index d6aca2c413fcd20213bd8f75e8d04b630ee5868f..541410ee4dc388b9b4bef92760fa27c9fc69a178 100644 (file)
@@ -1,12 +1,16 @@
 /* config.c - ldbm backend configuration file routine */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
+
+#include <ac/socket.h>
+#include <ac/string.h>
+
 #include "slap.h"
 #include "back-ldbm.h"
 
+void
 ldbm_back_config(
     Backend    *be,
     char       *fname,
@@ -31,7 +35,13 @@ ldbm_back_config(
                            fname, lineno );
                        exit( 1 );
                }
-               li->li_directory = strdup( argv[1] );
+               li->li_directory = ch_strdup( argv[1] );
+
+               li->li_nextid_file =
+                       ch_malloc( strlen(li->li_directory) + sizeof("/NEXTID") );
+
+               strcpy(li->li_nextid_file, li->li_directory);
+               strcat(li->li_nextid_file, "/NEXTID");
 
        /* mode with which to create new database files */
        } else if ( strcasecmp( argv[0], "mode" ) == 0 ) {
@@ -77,6 +87,10 @@ ldbm_back_config(
                }
                li->li_dbcachesize = atoi( argv[1] );
 
+       /* no write sync */
+       } else if ( strcasecmp( argv[0], "dbcachenowsync" ) == 0 ) {
+               li->li_dbcachewsync = 0;
+
        /* anything else */
        } else {
                fprintf( stderr,