]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/back-ldbm/config.c
Change overlapping `strcpy( x, y )' to `SAFEMEMCPY( x, y, strlen( y ) + 1 )'
[openldap] / servers / slapd / back-ldbm / config.c
index d6aca2c413fcd20213bd8f75e8d04b630ee5868f..99a7c7794ef0da8fc96e3bbb56d144ab1c7057b1 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,7 @@ ldbm_back_config(
                            fname, lineno );
                        exit( 1 );
                }
-               li->li_directory = strdup( argv[1] );
+               li->li_directory = ch_strdup( argv[1] );
 
        /* mode with which to create new database files */
        } else if ( strcasecmp( argv[0], "mode" ) == 0 ) {
@@ -77,6 +81,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,