mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-01-06 10:46:21 +08:00
handle overlays
This commit is contained in:
parent
c984dbf09b
commit
27f28d5270
@ -94,6 +94,7 @@ struct monitorinfo {
|
||||
AttributeDescription *mi_ad_monitorConnectionLocalAddress;
|
||||
AttributeDescription *mi_ad_monitorConnectionPeerAddress;
|
||||
AttributeDescription *mi_ad_monitorTimestamp;
|
||||
AttributeDescription *mi_ad_monitorOverlay;
|
||||
|
||||
/*
|
||||
* Generic description attribute
|
||||
|
@ -68,9 +68,16 @@ monitor_subsys_database_init(
|
||||
for ( i = nBackendDB; i--; ) {
|
||||
char buf[ BACKMONITOR_BUFSIZE ];
|
||||
int j;
|
||||
slap_overinfo *oi = NULL;
|
||||
|
||||
be = &backendDB[i];
|
||||
|
||||
if ( strcmp( be->bd_info->bi_type, "over" ) == 0 ) {
|
||||
oi = (slap_overinfo *)be->bd_info;
|
||||
|
||||
be = &oi->oi_bd;
|
||||
}
|
||||
|
||||
/* Subordinates are not exposed as their own naming context */
|
||||
if ( SLAP_GLUE_SUBORDINATE( be ) ) {
|
||||
continue;
|
||||
@ -125,6 +132,19 @@ monitor_subsys_database_init(
|
||||
be->be_suffix, be->be_nsuffix );
|
||||
}
|
||||
|
||||
if ( oi != NULL ) {
|
||||
slap_overinst *on = oi->oi_list;
|
||||
|
||||
for ( ; on; on = on->on_next ) {
|
||||
struct berval bv;
|
||||
|
||||
bv.bv_val = on->on_bi.bi_type;
|
||||
bv.bv_len = strlen( bv.bv_val );
|
||||
attr_merge_normalize_one( e, mi->mi_ad_monitorOverlay,
|
||||
&bv, NULL );
|
||||
}
|
||||
}
|
||||
|
||||
for ( j = nBackendInfo; j--; ) {
|
||||
if ( backendInfo[ j ].bi_type == be->bd_info->bi_type ) {
|
||||
struct berval bv;
|
||||
|
@ -323,6 +323,7 @@ monitor_back_db_open(
|
||||
"$ seeAlso "
|
||||
"$ monitoredInfo "
|
||||
"$ managedInfo "
|
||||
"$ monitorOverlay "
|
||||
") )", SLAP_OC_OPERATIONAL|SLAP_OC_HIDE,
|
||||
offsetof(struct monitorinfo, mi_oc_monitor) },
|
||||
{ "monitorServer", "( 1.3.6.1.4.1.4203.666.3.7 "
|
||||
@ -440,6 +441,13 @@ monitor_back_db_open(
|
||||
"NO-USER-MODIFICATION "
|
||||
"USAGE directoryOperation )", SLAP_AT_FINAL|SLAP_AT_HIDE,
|
||||
offsetof(struct monitorinfo, mi_ad_monitorTimestamp) },
|
||||
{ "monitorOverlay", "( 1.3.6.1.4.1.4203.666.1.27 "
|
||||
"NAME 'monitorOverlay' "
|
||||
"DESC 'name of overlays defined for a give database' "
|
||||
"SUP monitoredInfo "
|
||||
"NO-USER-MODIFICATION "
|
||||
"USAGE directoryOperation )", SLAP_AT_HIDE,
|
||||
offsetof(struct monitorinfo, mi_ad_monitorOverlay) },
|
||||
#ifdef INTEGRATE_CORE_SCHEMA
|
||||
{ NULL, NULL, 0, -1 }, /* description */
|
||||
{ NULL, NULL, 0, -1 }, /* seeAlso */
|
||||
|
Loading…
Reference in New Issue
Block a user