]> git.sur5r.net Git - openldap/commitdiff
Sync with HEAD
authorKurt Zeilenga <kurt@openldap.org>
Mon, 14 Nov 2005 21:18:25 +0000 (21:18 +0000)
committerKurt Zeilenga <kurt@openldap.org>
Mon, 14 Nov 2005 21:18:25 +0000 (21:18 +0000)
servers/slapd/back-monitor/init.c
servers/slapd/ctxcsn.c
tests/data/slapd-chain1.conf
tests/data/slapd-chain2.conf

index a13056cdf682f0bf3569bc460d9b38eb18ad9995..1f6a5777f5cc73f4d497ee34d5f6dc8ac2ca04cc 100644 (file)
@@ -970,11 +970,100 @@ int
 monitor_back_initialize(
        BackendInfo     *bi )
 {
-       monitor_subsys_t        *ms;
        static char             *controls[] = {
                LDAP_CONTROL_MANAGEDSAIT,
                NULL
        };
+
+       static ConfigTable monitorcfg[] = {
+               { NULL, NULL, 0, 0, 0, ARG_IGNORED,
+                       NULL, NULL, NULL, NULL }
+       };
+
+       static ConfigOCs monitorocs[] = {
+               { "( OLcfgDbOc:4.1 "
+                       "NAME 'olcMonitorConfig' "
+                       "DESC 'Monitor backend configuration' "
+                       "SUP olcDatabaseConfig "
+                       ")",
+                               Cft_Database, monitorcfg },
+               { NULL, 0, NULL }
+       };
+
+       int             rc;
+
+       bi->bi_controls = controls;
+
+       bi->bi_init = 0;
+       bi->bi_open = 0;
+       bi->bi_config = monitor_back_config;
+       bi->bi_close = 0;
+       bi->bi_destroy = 0;
+
+       bi->bi_db_init = monitor_back_db_init;
+       bi->bi_db_config = monitor_back_db_config;
+       bi->bi_db_open = monitor_back_db_open;
+       bi->bi_db_close = 0;
+       bi->bi_db_destroy = monitor_back_db_destroy;
+
+       bi->bi_op_bind = monitor_back_bind;
+       bi->bi_op_unbind = 0;
+       bi->bi_op_search = monitor_back_search;
+       bi->bi_op_compare = monitor_back_compare;
+       bi->bi_op_modify = monitor_back_modify;
+       bi->bi_op_modrdn = 0;
+       bi->bi_op_add = 0;
+       bi->bi_op_delete = 0;
+       bi->bi_op_abandon = 0;
+
+       bi->bi_extended = 0;
+
+       bi->bi_entry_release_rw = 0;
+       bi->bi_chk_referrals = 0;
+       bi->bi_operational = monitor_back_operational;
+
+       /*
+        * hooks for slap tools
+        */
+       bi->bi_tool_entry_open = 0;
+       bi->bi_tool_entry_close = 0;
+       bi->bi_tool_entry_first = 0;
+       bi->bi_tool_entry_next = 0;
+       bi->bi_tool_entry_get = 0;
+       bi->bi_tool_entry_put = 0;
+       bi->bi_tool_entry_reindex = 0;
+       bi->bi_tool_sync = 0;
+       bi->bi_tool_dn2id_get = 0;
+       bi->bi_tool_id2entry_get = 0;
+       bi->bi_tool_entry_modify = 0;
+
+       bi->bi_connection_init = 0;
+       bi->bi_connection_destroy = 0;
+
+       /*
+        * configuration objectClasses (fake)
+        */
+       bi->bi_cf_ocs = monitorocs;
+
+       rc = config_register_schema( monitorcfg, monitorocs );
+       if ( rc ) {
+               return rc;
+       }
+
+       return 0;
+}
+
+int
+monitor_back_db_init(
+       BackendDB       *be )
+{
+       int                     rc;
+       struct berval           dn = BER_BVC( SLAPD_MONITOR_DN ),
+                               pdn,
+                               ndn;
+       BackendDB               *be2;
+
+       monitor_subsys_t        *ms;
        monitor_info_t          *mi = &monitor_info;
        int                     i;
        const char              *text;
@@ -1252,78 +1341,6 @@ monitor_back_initialize(
                        offsetof(monitor_info_t, mi_ad_monitorRuntimeConfig) },
                { NULL, NULL, 0, -1 }
        };
-       static ConfigTable monitorcfg[] = {
-               { NULL, NULL, 0, 0, 0, ARG_IGNORED,
-                       NULL, NULL, NULL, NULL }
-       };
-       static ConfigOCs monitorocs[] = {
-               { "( OLcfgDbOc:4.1 "
-                       "NAME 'olcMonitorConfig' "
-                       "DESC 'Monitor backend configuration' "
-                       "SUP olcDatabaseConfig "
-                       ")",
-                               Cft_Database, monitorcfg },
-               { NULL, 0, NULL }
-       };
-       int             rc;
-
-       bi->bi_controls = controls;
-
-       bi->bi_init = 0;
-       bi->bi_open = 0;
-       bi->bi_config = monitor_back_config;
-       bi->bi_close = 0;
-       bi->bi_destroy = 0;
-
-       bi->bi_db_init = monitor_back_db_init;
-       bi->bi_db_config = monitor_back_db_config;
-       bi->bi_db_open = monitor_back_db_open;
-       bi->bi_db_close = 0;
-       bi->bi_db_destroy = monitor_back_db_destroy;
-
-       bi->bi_op_bind = monitor_back_bind;
-       bi->bi_op_unbind = 0;
-       bi->bi_op_search = monitor_back_search;
-       bi->bi_op_compare = monitor_back_compare;
-       bi->bi_op_modify = monitor_back_modify;
-       bi->bi_op_modrdn = 0;
-       bi->bi_op_add = 0;
-       bi->bi_op_delete = 0;
-       bi->bi_op_abandon = 0;
-
-       bi->bi_extended = 0;
-
-       bi->bi_entry_release_rw = 0;
-       bi->bi_chk_referrals = 0;
-       bi->bi_operational = monitor_back_operational;
-
-       /*
-        * hooks for slap tools
-        */
-       bi->bi_tool_entry_open = 0;
-       bi->bi_tool_entry_close = 0;
-       bi->bi_tool_entry_first = 0;
-       bi->bi_tool_entry_next = 0;
-       bi->bi_tool_entry_get = 0;
-       bi->bi_tool_entry_put = 0;
-       bi->bi_tool_entry_reindex = 0;
-       bi->bi_tool_sync = 0;
-       bi->bi_tool_dn2id_get = 0;
-       bi->bi_tool_id2entry_get = 0;
-       bi->bi_tool_entry_modify = 0;
-
-       bi->bi_connection_init = 0;
-       bi->bi_connection_destroy = 0;
-
-       /*
-        * configuration objectClasses (fake)
-        */
-       bi->bi_cf_ocs = monitorocs;
-
-       rc = config_register_schema( monitorcfg, monitorocs );
-       if ( rc ) {
-               return rc;
-       }
 
        /*
         * register subsys
@@ -1423,19 +1440,6 @@ monitor_back_initialize(
                ((ObjectClass **)&(((char *)mi)[ moc[ i ].offset ]))[ 0 ] = Oc;
        }
 
-       return 0;
-}
-
-int
-monitor_back_db_init(
-       BackendDB       *be )
-{
-       int             rc;
-       struct berval   dn = BER_BVC( SLAPD_MONITOR_DN ),
-                       pdn,
-                       ndn;
-       BackendDB       *be2;
-
        /*
         * database monitor can be defined once only
         */
index 87d8cbc3717464a32af500e8d61551df2216d694..90e16f6b3ec31e5c90395debae03ec851d17ae1e 100644 (file)
@@ -166,7 +166,7 @@ slap_queue_csn(
        ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp );
 
        ber_dupbv( &pending->ce_csn, csn );
-       op->o_csn = pending->ce_csn;
+       ber_dupbv_x( &op->o_csn, &pending->ce_csn, op->o_tmpmemctx );
        pending->ce_connid = op->o_connid;
        pending->ce_opid = op->o_opid;
        pending->ce_state = SLAP_CSN_PENDING;
index 225ad81c941887c21a7901430c9bfe31328ca118..8f3554718b1696259d2b506f9caf81604f47f981 100644 (file)
@@ -32,9 +32,10 @@ argsfile     @TESTDIR@/slapd.1.args
 #
 # uses the chain overlay as global;
 # no chain-URI is configured, so the URI is parsed out of the referral
-overlay                chain
-chain-acl-authcDN      "cn=Manager,dc=example,dc=com"
-chain-acl-passwd       secret
+overlay         chain
+chain-acl-bind bindmethod=simple
+               binddn="cn=Manager,dc=example,dc=com"
+               credentials=secret
 
 #######################################################################
 # database definitions
index 4edbf7006e442f271d7ac9ff09ca22cc5b5295a4..acc434ba55a6b5d8426073d582ae04b6a0e9f3ae 100644 (file)
@@ -56,7 +56,8 @@ rootpw                secret
 # the chain-URI is configured, so only that URI is chained
 overlay                chain
 chain-uri      @URI1@
-chain-acl-authcDN      "cn=Manager,dc=example,dc=com"
-chain-acl-passwd       secret
+chain-acl-bind bindmethod=simple
+               binddn="cn=Manager,dc=example,dc=com"
+               credentials=secret
 
 #monitor#database      monitor