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) );
44 e->e_dn = strdup( SLAPD_CONFIG_DN );
46 for ( i = 0; i < nbackends; i++ ) {
47 strcpy( buf, backends[i].be_type );
48 for ( j = 0; backends[i].be_suffix[j] != NULL; j++ ) {
50 strcat( buf, backends[i].be_suffix[j] );
53 val.bv_len = strlen( buf );
54 attr_merge( e, "database", vals );
57 if ( default_referral != NULL ) {
58 strcpy( buf, default_referral );
60 val.bv_len = strlen( buf );
61 attr_merge( e, "database", vals );
64 send_search_entry( &backends[0], conn, op, e, NULL, 0 );
65 send_ldap_search_result( conn, op, LDAP_SUCCESS, NULL, NULL, 1 );
70 #endif /* slapd_config_dn */