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.
17 #include <ac/string.h>
18 #include <ac/socket.h>
20 #include "ldapconfig.h"
23 #if defined( SLAPD_CONFIG_DN )
26 * no mutex protection in here - take our chances!
30 config_info( Connection *conn, Operation *op )
35 struct berval *vals[2];
41 e = (Entry *) ch_calloc( 1, sizeof(Entry) );
44 e->e_dn = ch_strdup( SLAPD_CONFIG_DN );
47 for ( i = 0; i < nbackends; i++ ) {
48 strcpy( buf, backends[i].be_type );
49 for ( j = 0; backends[i].be_suffix[j] != NULL; j++ ) {
51 strcat( buf, backends[i].be_suffix[j] );
54 val.bv_len = strlen( buf );
55 attr_merge( e, "database", vals );
58 if ( default_referral != NULL ) {
59 strcpy( buf, default_referral );
61 val.bv_len = strlen( buf );
62 attr_merge( e, "database", vals );
65 send_search_entry( &backends[0], conn, op, e, NULL, 0 );
66 send_ldap_search_result( conn, op, LDAP_SUCCESS, NULL, NULL, 1 );
71 #endif /* slapd_config_dn */