]> git.sur5r.net Git - openldap/commitdiff
add {creators|modifiers}Name to all entries
authorPierangelo Masarati <ando@openldap.org>
Mon, 19 Jul 2004 21:42:11 +0000 (21:42 +0000)
committerPierangelo Masarati <ando@openldap.org>
Mon, 19 Jul 2004 21:42:11 +0000 (21:42 +0000)
servers/slapd/back-monitor/back-monitor.h
servers/slapd/back-monitor/backend.c
servers/slapd/back-monitor/conn.c
servers/slapd/back-monitor/database.c
servers/slapd/back-monitor/init.c
servers/slapd/back-monitor/listener.c
servers/slapd/back-monitor/operation.c
servers/slapd/back-monitor/overlay.c
servers/slapd/back-monitor/rww.c
servers/slapd/back-monitor/sent.c
servers/slapd/back-monitor/time.c

index 16115d098a8b763fa7c299055f7ef50a80cd238b..3a41b59b1111951aba4030d2d96fa791f40d4db5 100644 (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
index 5349d39778c2a8bad026bbfba89489c41ffb070d..3a65745f90b958027d6f5b4220e6a2a7c39994b3 100644 (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 );
                
index e549918016b011d8e0da0fbb08ff8310b4b7a582..8c5a2a8cca402d017448e9a60b288b4efb29a15e 100644 (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 );
 
index f0d907a227e045635c48792e423f3f7b0bf90f81..1e3658b555c75e1e8813a7de2f0a032d4de68bac 100644 (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 );
                
index 7f5718d2189bdec857b1fd97ed49040c06d67921..6a68be5401009ac6a438dc61857ac1ad1d8e9f4c 100644 (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 );
 
index cbfd0ffde35465cc5b394e3a5b700a6cd4363690..20695a664e8b9a8b814fee590f002ffe5c3720a1 100644 (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 );
                
index 8d9982bd89816801029957087a93c0fda2847fa1..284224d378d4876edb6c10a2e3aa60f9c493826a 100644 (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 );
 
index 53240e657703f9e6a12efe83afed157ee2b130f4..7f557e69386b2ad2bcf76e69e0cfea7f6e468e47 100644 (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 );
                
index 445640d3a289ddf947e2e8012955c01ccf795df7..0bc517c3e741df54f7e000f82c88337afc4be8d9 100644 (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 ) {
index c461b3b30dfe73e3259725ac4ec383e70482707b..a548c851fc1a9f8a0ffa395255e997fa2c48e224 100644 (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 );
 
index a015cdfc9bd0328988adcdc515459c6b3b83b457..de03017e99ce662ebf9023672a50d029207176e9 100644 (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 );