add {creators|modifiers}Name to all entries

This commit is contained in:
Pierangelo Masarati 2004-07-19 21:42:11 +00:00
parent ebd1832d21
commit 1bbdcba854
11 changed files with 93 additions and 13 deletions

View File

@ -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

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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 );

View File

@ -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 ) {

View File

@ -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 );

View File

@ -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 );