]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/configinfo.c
Added note about fixing oc_schema_check (ITS#204).
[openldap] / servers / slapd / configinfo.c
index 5599193006cdf4a53cdc6f32354036aaf5ad9d4c..9736b296c1e45c4bf81e3538d71aa50d0dc12d90 100644 (file)
  * is provided ``as is'' without express or implied warranty.
  */
 
+#include "portable.h"
+
 #include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/socket.h>
-#include "slap.h"
+
+#include <ac/string.h>
+#include <ac/socket.h>
+
 #include "ldapconfig.h"
+#include "slap.h"
 
 #if defined( SLAPD_CONFIG_DN )
 
-extern int             nbackends;
-extern Backend         *backends;
-extern char            *default_referral;
-
 /*
  * no mutex protection in here - take our chances!
  */
@@ -40,8 +39,12 @@ config_info( Connection *conn, Operation *op )
        vals[1] = NULL;
 
        e = (Entry *) ch_calloc( 1, sizeof(Entry) );
+       /* initialize reader/writer lock */
+       entry_rdwr_init(e);
+
        e->e_attrs = NULL;
-       e->e_dn = strdup( SLAPD_CONFIG_DN );
+       e->e_dn = ch_strdup( SLAPD_CONFIG_DN );
+       e->e_ndn = dn_normalize_case( ch_strdup( SLAPD_CONFIG_DN ));
 
        for ( i = 0; i < nbackends; i++ ) {
                strcpy( buf, backends[i].be_type );