This commit is contained in:
Pierangelo Masarati 2004-11-15 14:17:08 +00:00
parent 5a91da6624
commit 2d5ec082dd
2 changed files with 5 additions and 4 deletions

View file

@ -143,15 +143,14 @@ ldap_back_db_open( BackendDB *be )
{
struct berval filter,
base = BER_BVC( "cn=Databases,cn=Monitor" );
const char *text;
struct berval vals[ 2 ];
Attribute a = { 0 };
filter.bv_len = STRLENOF( "(&(namingContexts=)(monitoredInfo=ldap))" )
filter.bv_len = STRLENOF( "(&(namingContexts:distinguishedNameMatch:=)(monitoredInfo=ldap))" )
+ be->be_nsuffix[ 0 ].bv_len;
filter.bv_val = ch_malloc( filter.bv_len + 1 );
snprintf( filter.bv_val, filter.bv_len + 1,
"(&(namingContexts=%s)(monitoredInfo=ldap))",
"(&(namingContexts:distinguishedNameMatch:=%s)(monitoredInfo=ldap))",
be->be_nsuffix[ 0 ].bv_val );
a.a_desc = slap_schema.si_ad_labeledURI;
@ -162,6 +161,8 @@ ldap_back_db_open( BackendDB *be )
if ( monitor_back_register_entry_attrs( NULL, &a, NULL, &base, LDAP_SCOPE_SUBTREE, &filter ) ) {
/* error */
}
ch_free( filter.bv_val );
}
#endif /* SLAPD_MONITOR */

View file

@ -257,7 +257,7 @@ monitor_subsys_database_init(
}
}
#if 0 // defined(SLAPD_LDAP)
#if defined(SLAPD_LDAP)
if ( strcmp( bi->bi_type, "ldap" ) == 0 ) {
struct ldapinfo *li = (struct ldapinfo *)be->be_private;
struct berval bv;