From 1bbdcba854ee7f5c672915f86a6193af055bbb5f Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Mon, 19 Jul 2004 21:42:11 +0000 Subject: [PATCH] add {creators|modifiers}Name to all entries --- servers/slapd/back-monitor/back-monitor.h | 3 ++- servers/slapd/back-monitor/backend.c | 4 +++ servers/slapd/back-monitor/conn.c | 15 +++++++++++- servers/slapd/back-monitor/database.c | 4 +++ servers/slapd/back-monitor/init.c | 14 +++++++++++ servers/slapd/back-monitor/listener.c | 4 +++ servers/slapd/back-monitor/operation.c | 4 +++ servers/slapd/back-monitor/overlay.c | 4 +++ servers/slapd/back-monitor/rww.c | 30 ++++++++++++++--------- servers/slapd/back-monitor/sent.c | 16 ++++++++++++ servers/slapd/back-monitor/time.c | 8 ++++++ 11 files changed, 93 insertions(+), 13 deletions(-) diff --git a/servers/slapd/back-monitor/back-monitor.h b/servers/slapd/back-monitor/back-monitor.h index 16115d098a..3a41b59b11 100644 --- a/servers/slapd/back-monitor/back-monitor.h +++ b/servers/slapd/back-monitor/back-monitor.h @@ -70,7 +70,8 @@ struct monitorinfo { * Config parameters */ struct berval mi_l; - struct berval mi_startTime; /* don't free it */ + struct berval mi_startTime; /* don't free it! */ + struct berval mi_creatorsName; /* don't free it! */ /* * Specific schema entities diff --git a/servers/slapd/back-monitor/backend.c b/servers/slapd/back-monitor/backend.c index 5349d39778..3a65745f90 100644 --- a/servers/slapd/back-monitor/backend.c +++ b/servers/slapd/back-monitor/backend.c @@ -75,6 +75,8 @@ monitor_subsys_backend_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Backend %d\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", i, @@ -82,6 +84,8 @@ monitor_subsys_backend_init( mi->mi_oc_monitoredObject->soc_cname.bv_val, mi->mi_oc_monitoredObject->soc_cname.bv_val, i, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); diff --git a/servers/slapd/back-monitor/conn.c b/servers/slapd/back-monitor/conn.c index e549918016..8c5a2a8cca 100644 --- a/servers/slapd/back-monitor/conn.c +++ b/servers/slapd/back-monitor/conn.c @@ -73,11 +73,15 @@ monitor_subsys_conn_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Total\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -137,11 +141,15 @@ monitor_subsys_conn_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Current\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -312,13 +320,18 @@ conn_create( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: " CONN_CN_PREFIX " %ld\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", c->c_connid, monitor_subsys[SLAPD_MONITOR_CONN].mss_dn.bv_val, mi->mi_oc_monitorConnection->soc_cname.bv_val, mi->mi_oc_monitorConnection->soc_cname.bv_val, c->c_connid, - ctmbuf, mtmbuf ); + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, + ctmbuf, + mtmbuf ); e = str2entry( buf ); diff --git a/servers/slapd/back-monitor/database.c b/servers/slapd/back-monitor/database.c index f0d907a227..1e3658b555 100644 --- a/servers/slapd/back-monitor/database.c +++ b/servers/slapd/back-monitor/database.c @@ -157,6 +157,8 @@ monitor_subsys_database_init( "cn: Database %d\n" "description: This object contains the type of the database.\n" "%s: %s\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", i, @@ -166,6 +168,8 @@ monitor_subsys_database_init( i, mi->mi_ad_monitoredInfo->ad_cname.bv_val, bi->bi_type, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); diff --git a/servers/slapd/back-monitor/init.c b/servers/slapd/back-monitor/init.c index 7f5718d218..6a68be5401 100644 --- a/servers/slapd/back-monitor/init.c +++ b/servers/slapd/back-monitor/init.c @@ -712,6 +712,12 @@ monitor_back_db_open( mi->mi_startTime.bv_val = tmbuf; mi->mi_startTime.bv_len = strlen( tmbuf ); + if ( BER_BVISEMPTY( &be->be_rootdn ) ) { + BER_BVSTR( &mi->mi_creatorsName, SLAPD_ANONYMOUS ); + } else { + mi->mi_creatorsName = be->be_rootdn; + } + /* * Create all the subsystem specific entries */ @@ -765,12 +771,16 @@ monitor_back_db_open( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: %s\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[ i ].mss_dn.bv_val, mi->mi_oc_monitorContainer->soc_cname.bv_val, mi->mi_oc_monitorContainer->soc_cname.bv_val, monitor_subsys[ i ].mss_name, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -826,6 +836,8 @@ monitor_back_db_open( "%s: createTimestamp reflects the time this server instance was created.\n" "%s: modifyTimestamp reflects the time this server instance was last accessed.\n" #endif + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", SLAPD_MONITOR_DN, @@ -837,6 +849,8 @@ monitor_back_db_open( mi->mi_ad_description->ad_cname.bv_val, mi->mi_ad_description->ad_cname.bv_val, #endif + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); diff --git a/servers/slapd/back-monitor/listener.c b/servers/slapd/back-monitor/listener.c index cbfd0ffde3..20695a664e 100644 --- a/servers/slapd/back-monitor/listener.c +++ b/servers/slapd/back-monitor/listener.c @@ -84,6 +84,8 @@ monitor_subsys_listener_init( "cn: Listener %d\n" "%s: %s\n" "labeledURI: %s\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", i, @@ -94,6 +96,8 @@ monitor_subsys_listener_init( mi->mi_ad_monitorConnectionLocalAddress->ad_cname.bv_val, l[i]->sl_name.bv_val, l[i]->sl_url.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); diff --git a/servers/slapd/back-monitor/operation.c b/servers/slapd/back-monitor/operation.c index 8d9982bd89..284224d378 100644 --- a/servers/slapd/back-monitor/operation.c +++ b/servers/slapd/back-monitor/operation.c @@ -94,6 +94,8 @@ monitor_subsys_ops_init( "cn: %s\n" "%s: 0\n" "%s: 0\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", bv_op[ i ].bv_val, @@ -103,6 +105,8 @@ monitor_subsys_ops_init( bv_op[ i ].bv_val, mi->mi_ad_monitorOpInitiated->ad_cname.bv_val, mi->mi_ad_monitorOpCompleted->ad_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); diff --git a/servers/slapd/back-monitor/overlay.c b/servers/slapd/back-monitor/overlay.c index 53240e6577..7f557e6938 100644 --- a/servers/slapd/back-monitor/overlay.c +++ b/servers/slapd/back-monitor/overlay.c @@ -72,6 +72,8 @@ monitor_subsys_overlay_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Overlay %d\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", i, @@ -79,6 +81,8 @@ monitor_subsys_overlay_init( mi->mi_oc_monitoredObject->soc_cname.bv_val, mi->mi_oc_monitoredObject->soc_cname.bv_val, i, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); diff --git a/servers/slapd/back-monitor/rww.c b/servers/slapd/back-monitor/rww.c index 445640d3a2..0bc517c3e7 100644 --- a/servers/slapd/back-monitor/rww.c +++ b/servers/slapd/back-monitor/rww.c @@ -71,11 +71,15 @@ monitor_subsys_rww_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Read\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_RWW].mss_dn.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -128,17 +132,21 @@ monitor_subsys_rww_init( * Current conns */ snprintf( buf, sizeof( buf ), - "dn: cn=Write,%s\n" - "objectClass: %s\n" - "structuralObjectClass: %s\n" - "cn: Write\n" - "createTimestamp: %s\n" - "modifyTimestamp: %s\n", - monitor_subsys[SLAPD_MONITOR_RWW].mss_dn.bv_val, - mi->mi_oc_monitorCounterObject->soc_cname.bv_val, - mi->mi_oc_monitorCounterObject->soc_cname.bv_val, - mi->mi_startTime.bv_val, - mi->mi_startTime.bv_val ); + "dn: cn=Write,%s\n" + "objectClass: %s\n" + "structuralObjectClass: %s\n" + "cn: Write\n" + "creatorsName: %s\n" + "modifiersName: %s\n" + "createTimestamp: %s\n" + "modifyTimestamp: %s\n", + monitor_subsys[SLAPD_MONITOR_RWW].mss_dn.bv_val, + mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_startTime.bv_val, + mi->mi_startTime.bv_val ); e = str2entry( buf ); if ( e == NULL ) { diff --git a/servers/slapd/back-monitor/sent.c b/servers/slapd/back-monitor/sent.c index c461b3b30d..a548c851fc 100644 --- a/servers/slapd/back-monitor/sent.c +++ b/servers/slapd/back-monitor/sent.c @@ -70,11 +70,15 @@ monitor_subsys_sent_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Entries\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -133,11 +137,15 @@ monitor_subsys_sent_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Referrals\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -196,11 +204,15 @@ monitor_subsys_sent_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: PDU\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -259,11 +271,15 @@ monitor_subsys_sent_init( "objectClass: %s\n" "structuralObjectClass: %s\n" "cn: Bytes\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_SENT].mss_dn.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, mi->mi_oc_monitorCounterObject->soc_cname.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); diff --git a/servers/slapd/back-monitor/time.c b/servers/slapd/back-monitor/time.c index a015cdfc9b..de03017e99 100644 --- a/servers/slapd/back-monitor/time.c +++ b/servers/slapd/back-monitor/time.c @@ -71,6 +71,8 @@ monitor_subsys_time_init( "structuralObjectClass: %s\n" "cn: Start\n" "%s: %s\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_TIME].mss_dn.bv_val, @@ -78,6 +80,8 @@ monitor_subsys_time_init( mi->mi_oc_monitoredObject->soc_cname.bv_val, mi->mi_ad_monitorTimestamp->ad_cname.bv_val, mi->mi_startTime.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); @@ -133,6 +137,8 @@ monitor_subsys_time_init( "structuralObjectClass: %s\n" "cn: Current\n" "%s: %s\n" + "creatorsName: %s\n" + "modifiersName: %s\n" "createTimestamp: %s\n" "modifyTimestamp: %s\n", monitor_subsys[SLAPD_MONITOR_TIME].mss_dn.bv_val, @@ -140,6 +146,8 @@ monitor_subsys_time_init( mi->mi_oc_monitoredObject->soc_cname.bv_val, mi->mi_ad_monitorTimestamp->ad_cname.bv_val, mi->mi_startTime.bv_val, + mi->mi_creatorsName.bv_val, + mi->mi_creatorsName.bv_val, mi->mi_startTime.bv_val, mi->mi_startTime.bv_val ); -- 2.39.5