From 2c8829b8ca746a918ad68788b7341ea1346004e4 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Wed, 4 May 2005 09:27:22 +0000 Subject: [PATCH] add "monitorIsShadow" (ITS#3696); more to come (see discussion) --- servers/slapd/back-monitor/back-monitor.h | 1 + servers/slapd/back-monitor/database.c | 9 ++++++--- servers/slapd/back-monitor/init.c | 8 ++++++++ 3 files changed, 15 insertions(+), 3 deletions(-) diff --git a/servers/slapd/back-monitor/back-monitor.h b/servers/slapd/back-monitor/back-monitor.h index 4f44291adc..511c4c48ab 100644 --- a/servers/slapd/back-monitor/back-monitor.h +++ b/servers/slapd/back-monitor/back-monitor.h @@ -120,6 +120,7 @@ typedef struct monitor_info_t { AttributeDescription *mi_ad_monitorConnectionPeerDomain; AttributeDescription *mi_ad_monitorConnectionStartTime; AttributeDescription *mi_ad_monitorConnectionActivityTime; + AttributeDescription *mi_ad_monitorIsShadow; /* * Generic description attribute diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c index f6f58134d4..267042d8ee 100644 --- a/servers/slapd/back-monitor/database.c +++ b/servers/slapd/back-monitor/database.c @@ -196,17 +196,20 @@ monitor_subsys_database_init( "structuralObjectClass: %s\n" "cn: Database %d\n" "%s: %s\n" + "%s: %s\n" "creatorsName: %s\n" "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", i, - ms->mss_dn.bv_val, + ms->mss_dn.bv_val, mi->mi_oc_monitoredObject->soc_cname.bv_val, mi->mi_oc_monitoredObject->soc_cname.bv_val, i, mi->mi_ad_monitoredInfo->ad_cname.bv_val, - bi->bi_type, + bi->bi_type, + mi->mi_ad_monitorIsShadow->ad_cname.bv_val, + SLAP_SHADOW( be ) ? slap_true_bv.bv_val : slap_false_bv.bv_val, mi->mi_creatorsName.bv_val, mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, @@ -221,7 +224,7 @@ monitor_subsys_database_init( return( -1 ); } - if ( SLAP_MONITOR(be) ) { + if ( SLAP_MONITOR( be ) ) { attr_merge( e, slap_schema.si_ad_monitorContext, be->be_suffix, be->be_nsuffix ); attr_merge( e_database, slap_schema.si_ad_monitorContext, diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 1e007a06ba..1986aae667 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -1158,6 +1158,14 @@ monitor_back_initialize( "NO-USER-MODIFICATION " "USAGE directoryOperation )", SLAP_AT_FINAL|SLAP_AT_HIDE, offsetof(monitor_info_t, mi_ad_monitorConnectionActivityTime) }, + { "monitorIsShadow", "( 1.3.6.1.4.1.4203.666.1.52 " + "NAME 'monitorIsShadow' " + "DESC 'TRUE if the database is shadow' " + "EQUALITY booleanMatch " + "SYNTAX 1.3.6.1.4.1.1466.115.121.1.7 " + "SINGLE-VALUE " + "USAGE directoryOperation )", SLAP_AT_HIDE, + offsetof(monitor_info_t, mi_ad_monitorIsShadow) }, { NULL, NULL, 0, -1 } }; -- 2.39.5