]> git.sur5r.net Git - openldap/blobdiff - servers/slapd/configinfo.c
Changed search attrs to struct berval **.
[openldap] / servers / slapd / configinfo.c
index 0b3acf089b072a024c5d3f0faddb8e1ec67e350e..51c2b472fc6e845f3fffeeca138d6677f78f9909 100644 (file)
@@ -1,5 +1,6 @@
+/* $OpenLDAP$ */
 /*
- * Copyright 1998-1999 The OpenLDAP Foundation, All Rights Reserved.
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
  * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
  */
 /*
  * no mutex protection in here - take our chances!
  */
 
-void
+int
 config_info(
-       Connection *conn,
-       Operation *op,
-       char **attrs,
-       int attrsonly )
+       Entry **entry, const char **text )
 {
        Entry           *e;
        char            buf[BUFSIZ];
@@ -50,9 +48,21 @@ config_info(
        e->e_attrs = NULL;
        e->e_dn = ch_strdup( SLAPD_CONFIG_DN );
        e->e_ndn = ch_strdup( SLAPD_CONFIG_DN );
-       (void) dn_normalize_case( e->e_ndn );
+       (void) dn_normalize( e->e_ndn );
        e->e_private = NULL;
 
+       val.bv_val = "top";
+       val.bv_len = sizeof("top")-1;
+       attr_merge( e, "objectClass", vals );
+
+       val.bv_val = "LDAPsubentry";
+       val.bv_len = sizeof("LDAPsubentry")-1;
+       attr_merge( e, "objectClass", vals );
+
+       val.bv_val = "extensibleObject";
+       val.bv_len = sizeof("extensibleObject")-1;
+       attr_merge( e, "objectClass", vals );
+
        {
                char *rdn = ch_strdup( SLAPD_CONFIG_DN );
                val.bv_val = strchr( rdn, '=' );
@@ -71,31 +81,15 @@ config_info(
                strcpy( buf, backends[i].be_type );
                for ( j = 0; backends[i].be_suffix[j] != NULL; j++ ) {
                        strcat( buf, " : " );
-                       strcat( buf, backends[i].be_suffix[j] );
+                       strcat( buf, backends[i].be_suffix[j]->bv_val );
                }
                val.bv_val = buf;
                val.bv_len = strlen( buf );
                attr_merge( e, "database", vals );
        }
 
-       val.bv_val = "top";
-       val.bv_len = sizeof("top")-1;
-       attr_merge( e, "objectClass", vals );
-
-       val.bv_val = "LDAPsubentry";
-       val.bv_len = sizeof("LDAPsubentry")-1;
-       attr_merge( e, "objectClass", vals );
-
-       val.bv_val = "extensibleObject";
-       val.bv_len = sizeof("extensibleObject")-1;
-       attr_merge( e, "objectClass", vals );
-
-       send_search_entry( &backends[0], conn, op, e,
-               attrs, attrsonly, NULL );
-       send_search_result( conn, op, LDAP_SUCCESS,
-               NULL, NULL, NULL, NULL, 1 );
-
-       entry_free( e );
+       *entry = e;
+       return LDAP_SUCCESS;
 }
 
 #endif /* slapd_config_dn */