+/* $OpenLDAP$ */
+/*
+ * Copyright 1998-2000 The OpenLDAP Foundation, All Rights Reserved.
+ * COPYING RESTRICTIONS APPLY, see COPYRIGHT file
+ */
/*
* Copyright (c) 1995 Regents of the University of Michigan.
* All rights reserved.
#include <ac/string.h>
#include <ac/socket.h>
-#include "ldap_defaults.h"
#include "slap.h"
#if defined( SLAPD_CONFIG_DN )
* 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];
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, '=' );
attr_merge( e, "database", vals );
}
- val.bv_val = "top";
- val.bv_len = sizeof("top")-1;
- attr_merge( e, "objectClass", vals );
-
- val.bv_val = "extenisbleObject";
- val.bv_len = sizeof("extenisbleObject")-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 */