2 * Copyright (c) 1995 Regents of the University of Michigan.
5 * Redistribution and use in source and binary forms are permitted
6 * provided that this notice is preserved and that due credit is given
7 * to the University of Michigan at Ann Arbor. The name of the University
8 * may not be used to endorse or promote products derived from this
9 * software without specific prior written permission. This software
10 * is provided ``as is'' without express or implied warranty.
15 #include <sys/types.h>
16 #include <sys/socket.h>
18 #include "ldapconfig.h"
20 #if defined( SLAPD_CONFIG_DN )
23 extern Backend *backends;
24 extern char *default_referral;
27 * no mutex protection in here - take our chances!
31 config_info( Connection *conn, Operation *op )
36 struct berval *vals[2];
42 e = (Entry *) ch_calloc( 1, sizeof(Entry) );
43 /* initialize reader/writer lock */
47 e->e_dn = strdup( SLAPD_CONFIG_DN );
49 for ( i = 0; i < nbackends; i++ ) {
50 strcpy( buf, backends[i].be_type );
51 for ( j = 0; backends[i].be_suffix[j] != NULL; j++ ) {
53 strcat( buf, backends[i].be_suffix[j] );
56 val.bv_len = strlen( buf );
57 attr_merge( e, "database", vals );
60 if ( default_referral != NULL ) {
61 strcpy( buf, default_referral );
63 val.bv_len = strlen( buf );
64 attr_merge( e, "database", vals );
67 send_search_entry( &backends[0], conn, op, e, NULL, 0 );
68 send_ldap_search_result( conn, op, LDAP_SUCCESS, NULL, NULL, 1 );
73 #endif /* slapd_config_dn */