From 03f19c1c7d3801f2b5d72e50bf982d31c3f96f8e94087c9613300b3d2965025d Mon Sep 17 00:00:00 2001 From: OBS User unknown Date: Tue, 24 Mar 2009 18:56:33 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openldap2?expand=0&rev=47 --- libldap_ctrl_lderrno.dif | 64 ----- libldap_r-tpool-resume-ITS5841.diff | 18 -- openldap-2.4.12.tar.bz2 | 3 - openldap-2.4.15.tar.bz2 | 3 + openldap2-client.changes | 39 +++ openldap2-client.spec | 71 ++++-- openldap2.changes | 39 +++ openldap2.spec | 71 ++++-- secpatch.dif | 16 -- slapadd-no-trickle.dif | 76 ------ slapd-bconfig-del-db.dif | 22 +- slapd-bdb-stop-checkpoint.dif | 26 -- slapd-db-close-error-its5745.dif | 238 ----------------- slapd-ldap_back_entry_get_rw-ITS6003.diff | 19 ++ slapd-privdb-config-its5736.dif | 267 ------------------- slapd_getaddrinfo_dupl.dif | 102 ++++++++ slapo-chain-dangling-its5742.dif | 138 ---------- slapo-syncprov-skip-its5709.dif | 296 ---------------------- 18 files changed, 309 insertions(+), 1199 deletions(-) delete mode 100644 libldap_ctrl_lderrno.dif delete mode 100644 libldap_r-tpool-resume-ITS5841.diff delete mode 100644 openldap-2.4.12.tar.bz2 create mode 100644 openldap-2.4.15.tar.bz2 delete mode 100644 secpatch.dif delete mode 100644 slapadd-no-trickle.dif delete mode 100644 slapd-bdb-stop-checkpoint.dif delete mode 100644 slapd-db-close-error-its5745.dif create mode 100644 slapd-ldap_back_entry_get_rw-ITS6003.diff delete mode 100644 slapd-privdb-config-its5736.dif create mode 100644 slapd_getaddrinfo_dupl.dif delete mode 100644 slapo-chain-dangling-its5742.dif delete mode 100644 slapo-syncprov-skip-its5709.dif diff --git a/libldap_ctrl_lderrno.dif b/libldap_ctrl_lderrno.dif deleted file mode 100644 index 2e8f45e..0000000 --- a/libldap_ctrl_lderrno.dif +++ /dev/null @@ -1,64 +0,0 @@ -Index: libraries/libldap/pagectrl.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/pagectrl.c,v -retrieving revision 1.10 -retrieving revision 1.11 -diff -u -r1.10 -r1.11 ---- libraries/libldap/pagectrl.c 9 Jan 2008 12:28:09 -0000 1.10 -+++ libraries/libldap/pagectrl.c 21 Oct 2008 14:17:41 -0000 1.11 -@@ -71,6 +71,7 @@ - - value->bv_val = NULL; - value->bv_len = 0; -+ ld->ld_errno = LDAP_SUCCESS; - - if ( cookie == NULL ) { - cookie = &null_cookie; -Index: libraries/libldap/sortctrl.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/sortctrl.c,v -retrieving revision 1.24 -retrieving revision 1.25 -diff -u -r1.24 -r1.25 ---- libraries/libldap/sortctrl.c 7 Jan 2008 23:20:04 -0000 1.24 -+++ libraries/libldap/sortctrl.c 21 Oct 2008 14:17:41 -0000 1.25 -@@ -304,6 +304,7 @@ - - value->bv_val = NULL; - value->bv_len = 0; -+ ld->ld_errno = LDAP_SUCCESS; - - ber = ldap_alloc_ber_with_options( ld ); - if ( ber == NULL) { -Index: libraries/libldap/vlvctrl.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/vlvctrl.c,v -retrieving revision 1.25 -retrieving revision 1.26 -diff -u -r1.25 -r1.26 ---- libraries/libldap/vlvctrl.c 7 Jan 2008 23:20:05 -0000 1.25 -+++ libraries/libldap/vlvctrl.c 21 Oct 2008 14:17:41 -0000 1.26 -@@ -101,6 +101,7 @@ - - value->bv_val = NULL; - value->bv_len = 0; -+ ld->ld_errno = LDAP_SUCCESS; - - ber = ldap_alloc_ber_with_options( ld ); - if ( ber == NULL ) { -Index: libraries/libldap/stctrl.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap/stctrl.c,v -retrieving revision 1.4 -retrieving revision 1.5 -diff -u -r1.4 -r1.5 ---- libraries/libldap/stctrl.c 7 Jan 2008 23:20:04 -0000 1.4 -+++ libraries/libldap/stctrl.c 21 Oct 2008 14:17:41 -0000 1.5 -@@ -60,6 +60,7 @@ - } - - assert( LDAP_VALID( ld ) ); -+ ld->ld_errno = LDAP_SUCCESS; - - /* check sizes according to I.D. */ - if ( sessionSourceIp == NULL ) { diff --git a/libldap_r-tpool-resume-ITS5841.diff b/libldap_r-tpool-resume-ITS5841.diff deleted file mode 100644 index d41e828..0000000 --- a/libldap_r-tpool-resume-ITS5841.diff +++ /dev/null @@ -1,18 +0,0 @@ -Index: libraries/libldap_r/tpool.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/libraries/libldap_r/tpool.c,v -retrieving revision 1.97 -retrieving revision 1.98 -diff -u -r1.97 -r1.98 ---- libraries/libldap_r/tpool.c 10 Mar 2008 12:21:24 -0000 1.97 -+++ libraries/libldap_r/tpool.c 9 Dec 2008 09:57:15 -0000 1.98 -@@ -785,8 +785,7 @@ - SET_VARY_OPEN_COUNT(pool); - pool->ltp_work_list = &pool->ltp_pending_list; - -- if (!pool->ltp_finishing) -- ldap_pvt_thread_cond_broadcast(&pool->ltp_cond); -+ ldap_pvt_thread_cond_broadcast(&pool->ltp_cond); - - ldap_pvt_thread_mutex_unlock(&pool->ltp_mutex); - return(0); diff --git a/openldap-2.4.12.tar.bz2 b/openldap-2.4.12.tar.bz2 deleted file mode 100644 index 2ebad1e..0000000 --- a/openldap-2.4.12.tar.bz2 +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:5cd0553141bc9c7e8266338656d89e9dcd9328be1d7f6c70dbeadce7b5906291 -size 3996921 diff --git a/openldap-2.4.15.tar.bz2 b/openldap-2.4.15.tar.bz2 new file mode 100644 index 0000000..e8bc25b --- /dev/null +++ b/openldap-2.4.15.tar.bz2 @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:eaf8580b315c78d1b8862600546fb953c98e9f65cffaaeb7939e5b38f4eb3aa4 +size 4104966 diff --git a/openldap2-client.changes b/openldap2-client.changes index 7932584..006bd82 100644 --- a/openldap2-client.changes +++ b/openldap2-client.changes @@ -1,3 +1,42 @@ +------------------------------------------------------------------- +Fri Mar 20 14:00:20 CET 2009 - rhafer@suse.de + +- Update to 2.4.15. Most important changes: + * Fixed slapd bconfig conversion again (ITS#5346) + * Fixed slapd behavior with superior objectClasses again (ITS#5517) + * Fixed slapd RFC4512 behavior with same attr in RDN (ITS#5968) + * Fixed slapd corrupt contextCSN (ITS#5947) + * Fixed slapd syncrepl order to match on add/delete (ITS#5954) + * Fixed slapd adding rdn with other values (ITS#5965) + * Fixed slapd-bdb/hdb behavior with unallocatable shm (ITS#5956) + * Fixed slapd-ldap/meta with entries with invalid attrs (ITS#5959) + * Fixed slapo-pcache caching invalid entries (ITS#5927) + * Fixed slapo-syncprov csn updates (ITS#5969) + * Added libldap option to disable SASL host canonicalization (ITS#5812) + * Fixed libldap chasing multiple referrals (ITS#5853) + * Fixed libldap setuid usage with .ldaprc (ITS#4750) + * Fixed libldap deref handling (ITS#5768) + * Fixed libldap NULL pointer deref (ITS#5934) + * Fixed libldap peer cert memory leak (ITS#5849) + * Fixed libldap intermediate response behavior (ITS#5896) + * Fixed libldap IPv6 address handling (ITS#5937) + * Fixed libldap_r deref building (ITS#5768) + * Fixed libldap_r slapd lockup when paused during shutdown (ITS#5841) + * Fixed slapd acl checks on ADD (ITS#4556,ITS#5723) + * Fixed slapd acl application to newly created backends (ITS#5572) + * Fixed slapd bconfig to return error codes (ITS#5867) + * Fixed slapd bconfig encoding incorrectly (ITS#5897) + * Fixed slapd bconfig dangling pointers (ITS#5924) + * Fixed slapd epoll handling (ITS#5886) + * Fixed slapd glue with MMR (ITS#5925) + * Fixed slapd listener comparison (ITS#5613) + * Fixed various syncrepl issues (ITS#5809,ITS#5850, ITS#5843, + ITS#5866, ITS#5901, ITS#5881, ITS#5935, ITS#5710, + ITS#5781, ITS#5809, ITS#5798, ITS#5826) + * Fixed slapd-bdb/hdb dncachesize handling (ITS#5860) + * Fixed slapd-bdb/hdb trickle task usage (ITS#5864) + * Fixed slapd-hdb idlcache with empty suffix (ITS#5859) + ------------------------------------------------------------------- Wed Jan 7 12:34:56 CET 2009 - olh@suse.de diff --git a/openldap2-client.spec b/openldap2-client.spec index 4dd9d6f..ce3a541 100644 --- a/openldap2-client.spec +++ b/openldap2-client.spec @@ -1,5 +1,5 @@ # -# spec file for package openldap2-client (Version 2.4.12) +# spec file for package openldap2-client (Version 2.4.15) # # Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany. # @@ -21,13 +21,13 @@ Name: openldap2-client BuildRequires: cyrus-sasl-devel db-devel libopenssl-devel openslp-devel tcpd-devel %if %sles_version == 9 -BuildRequires: -libopenssl-devel -pwdutils openssl-devel +BuildRequires: -db-devel -libopenssl-devel -pwdutils libdb-4_5-devel openssl-devel %endif %if %sles_version == 10 BuildRequires: -db-devel -libopenssl-devel -pwdutils libdb-4_5-devel openssl-devel %endif -Version: 2.4.12 -Release: 7 +Version: 2.4.15 +Release: 1 Url: http://www.openldap.org License: BSD 3-Clause %if "%{name}" == "openldap2" @@ -52,7 +52,6 @@ Source4: sasl-slapd.conf Source5: README.update Source100: openldap-2.3.37.tar.bz2 Patch: openldap2.dif -Patch1: secpatch.dif Patch2: slapd_conf.dif Patch3: ldap_conf.dif Patch4: ldapi_url.dif @@ -60,16 +59,10 @@ Patch6: libldap-gethostbyname_r.dif Patch7: pie-compile.dif Patch9: openldap2-add-gnu-source.diff Patch11: slapd-bconfig-del-db.dif -Patch13: slapd-bdb-stop-checkpoint.dif Patch14: slapo-collect-include.dif -Patch15: libldap_ctrl_lderrno.dif -Patch16: slapd-privdb-config-its5736.dif -Patch17: slapo-chain-dangling-its5742.dif -Patch18: slapd-db-close-error-its5745.dif -Patch19: slapo-syncprov-skip-its5709.dif -Patch20: slapadd-no-trickle.dif -Patch21: libldap_r-tpool-resume-ITS5841.diff +Patch15: slapd-ldap_back_entry_get_rw-ITS6003.diff Patch100: openldap-2.3.37.dif +Patch200: slapd_getaddrinfo_dupl.dif BuildRoot: %{_tmppath}/%{name}-%{version}-build %description @@ -132,7 +125,11 @@ Obsoletes: openldap2-devel-64bit %endif # Conflicts: openldap-devel +%if %suse_version >= 1110 Requires: libldap-2_4-2 = %{version} cyrus-sasl-devel libopenssl-devel +%else +Requires: libldap-2_4-2 = %{version} cyrus-sasl-devel openssl-devel +%endif Group: Development/Libraries/C and C++ %description -n openldap2-devel @@ -165,7 +162,6 @@ Authors: %prep %setup -q -n openldap-%{version} -a1 -a2 -b100 %patch -%patch1 %patch2 %patch3 %patch4 @@ -175,18 +171,14 @@ Authors: %endif %patch9 -p1 %patch11 -%patch13 %patch14 -p1 %patch15 -%patch16 -%patch17 -%patch18 -%patch19 -%patch20 -p1 -%patch21 cp %{SOURCE5} . cd ../openldap-2.3.37 %patch100 +%if %suse_version == 1100 +%patch200 -p1 +%endif %build %{?suse_update_config:%{suse_update_config -f build}} @@ -361,6 +353,7 @@ cat > openldap2-client.filelist <= 1110 Requires: libldap-2_4-2 = %{version} cyrus-sasl-devel libopenssl-devel +%else +Requires: libldap-2_4-2 = %{version} cyrus-sasl-devel openssl-devel +%endif Group: Development/Libraries/C and C++ %description -n openldap2-devel @@ -168,7 +165,6 @@ Authors: %prep %setup -q -n openldap-%{version} -a1 -a2 -b100 %patch -%patch1 %patch2 %patch3 %patch4 @@ -178,18 +174,14 @@ Authors: %endif %patch9 -p1 %patch11 -%patch13 %patch14 -p1 %patch15 -%patch16 -%patch17 -%patch18 -%patch19 -%patch20 -p1 -%patch21 cp %{SOURCE5} . cd ../openldap-2.3.37 %patch100 +%if %suse_version == 1100 +%patch200 -p1 +%endif %build %{?suse_update_config:%{suse_update_config -f build}} @@ -364,6 +356,7 @@ cat > openldap2-client.filelist <bi_dbenv ); -- - ldap_pvt_thread_mutex_init( &bdb_tool_index_mutex ); - ldap_pvt_thread_cond_init( &bdb_tool_index_cond_main ); - ldap_pvt_thread_cond_init( &bdb_tool_index_cond_work ); -@@ -137,9 +129,6 @@ int bdb_tool_entry_close( - { - if ( bdb_tool_info ) { - slapd_shutdown = 1; -- ldap_pvt_thread_mutex_lock( &bdb_tool_trickle_mutex ); -- ldap_pvt_thread_cond_signal( &bdb_tool_trickle_cond ); -- ldap_pvt_thread_mutex_unlock( &bdb_tool_trickle_mutex ); - ldap_pvt_thread_mutex_lock( &bdb_tool_index_mutex ); - bdb_tool_index_tcount = slap_tool_thread_max - 1; - ldap_pvt_thread_cond_broadcast( &bdb_tool_index_cond_work ); -@@ -522,12 +511,6 @@ ID bdb_tool_entry_put( - goto done; - } - -- if (( slapMode & SLAP_TOOL_QUICK ) && (( e->e_id & 0xfff ) == 0xfff )) { -- ldap_pvt_thread_mutex_lock( &bdb_tool_trickle_mutex ); -- ldap_pvt_thread_cond_signal( &bdb_tool_trickle_cond ); -- ldap_pvt_thread_mutex_unlock( &bdb_tool_trickle_mutex ); -- } -- - if ( !bdb->bi_linear_index ) - rc = bdb_tool_index_add( &op, tid, e ); - if( rc != 0 ) { -@@ -1100,25 +1083,6 @@ int bdb_tool_idl_add( - #endif - - static void * --bdb_tool_trickle_task( void *ctx, void *ptr ) --{ -- DB_ENV *env = ptr; -- int wrote; -- -- ldap_pvt_thread_mutex_lock( &bdb_tool_trickle_mutex ); -- while ( 1 ) { -- ldap_pvt_thread_cond_wait( &bdb_tool_trickle_cond, -- &bdb_tool_trickle_mutex ); -- if ( slapd_shutdown ) -- break; -- env->memp_trickle( env, 30, &wrote ); -- } -- ldap_pvt_thread_mutex_unlock( &bdb_tool_trickle_mutex ); -- -- return NULL; --} -- --static void * - bdb_tool_index_task( void *ctx, void *ptr ) - { - int base = *(int *)ptr; diff --git a/slapd-bconfig-del-db.dif b/slapd-bconfig-del-db.dif index 84bf653..3f00c28 100644 --- a/slapd-bconfig-del-db.dif +++ b/slapd-bconfig-del-db.dif @@ -1,27 +1,19 @@ Index: servers/slapd/bconfig.c =================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/bconfig.c,v -retrieving revision 1.342 -retrieving revision 1.344 -diff -u -r1.342 -r1.344 ---- servers/slapd/bconfig.c 4 Sep 2008 11:56:31 -0000 1.342 -+++ servers/slapd/bconfig.c 4 Sep 2008 15:12:07 -0000 1.344 -@@ -5245,15 +5245,28 @@ - if ( last ) - rs->sr_matched = last->ce_entry->e_name.bv_val; +--- servers/slapd/bconfig.c.orig ++++ servers/slapd/bconfig.c +@@ -5379,13 +5379,26 @@ config_back_delete( Operation *op, SlapR rs->sr_err = LDAP_NO_SUCH_OBJECT; -- } else if ( ce->ce_kids ) { -+ } else if ( ce->ce_kids ) { + } else if ( ce->ce_kids ) { rs->sr_err = LDAP_UNWILLING_TO_PERFORM; - } else if ( ce->ce_type == Cft_Overlay ){ + } else if ( ce->ce_type == Cft_Overlay || ce->ce_type == Cft_Database ){ char *iptr; - int count, ixold, rc; + int count, ixold; ldap_pvt_thread_pool_pause( &connection_pool ); -- + - overlay_remove( ce->ce_be, (slap_overinst *)ce->ce_bi ); -+ + if ( ce->ce_type == Cft_Overlay ){ + overlay_remove( ce->ce_be, (slap_overinst *)ce->ce_bi ); + } else { /* Cft_Database*/ @@ -39,7 +31,7 @@ diff -u -r1.342 -r1.344 /* remove CfEntryInfo from the siblings list */ if ( ce->ce_parent->ce_kids == ce ) { -@@ -5315,6 +5328,7 @@ +@@ -5447,6 +5460,7 @@ config_back_delete( Operation *op, SlapR #else rs->sr_err = LDAP_UNWILLING_TO_PERFORM; #endif /* SLAP_CONFIG_DELETE */ diff --git a/slapd-bdb-stop-checkpoint.dif b/slapd-bdb-stop-checkpoint.dif deleted file mode 100644 index 5d5bcf1..0000000 --- a/slapd-bdb-stop-checkpoint.dif +++ /dev/null @@ -1,26 +0,0 @@ -Index: servers/slapd/back-bdb/init.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb/init.c,v -retrieving revision 1.293 -retrieving revision 1.294 -diff -u -r1.293 -r1.294 ---- servers/slapd/back-bdb/init.c 27 Aug 2008 20:28:16 -0000 1.293 -+++ servers/slapd/back-bdb/init.c 12 Sep 2008 07:53:40 -0000 1.294 -@@ -640,6 +640,17 @@ - { - struct bdb_info *bdb = (struct bdb_info *) be->be_private; - -+ /* stop and remove checkpoint task */ -+ if ( bdb->bi_txn_cp_task ) { -+ struct re_s *re = bdb->bi_txn_cp_task; -+ bdb->bi_txn_cp_task = NULL; -+ ldap_pvt_thread_mutex_lock( &slapd_rq.rq_mutex ); -+ if ( ldap_pvt_runqueue_isrunning( &slapd_rq, re ) ) -+ ldap_pvt_runqueue_stoptask( &slapd_rq, re ); -+ ldap_pvt_runqueue_remove( &slapd_rq, re ); -+ ldap_pvt_thread_mutex_unlock( &slapd_rq.rq_mutex ); -+ } -+ - /* monitor handling */ - (void)bdb_monitor_db_destroy( be ); - diff --git a/slapd-db-close-error-its5745.dif b/slapd-db-close-error-its5745.dif deleted file mode 100644 index e2c4428..0000000 --- a/slapd-db-close-error-its5745.dif +++ /dev/null @@ -1,238 +0,0 @@ -Index: servers/slapd/back-bdb/init.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-bdb/init.c,v -retrieving revision 1.298 -retrieving revision 1.299 -diff -u -r1.298 -r1.299 ---- servers/slapd/back-bdb/init.c 2 Nov 2008 22:06:11 -0000 1.298 -+++ servers/slapd/back-bdb/init.c 3 Nov 2008 12:00:00 -0000 1.299 -@@ -584,6 +584,17 @@ - ber_bvarray_free( bdb->bi_db_config ); - bdb->bi_db_config = NULL; - -+ if( bdb->bi_dbenv ) { -+ /* Free cache locker if we enabled locking. -+ * TXNs must all be closed before DBs... -+ */ -+ if ( !( slapMode & SLAP_TOOL_QUICK ) && bdb->bi_cache.c_txn ) { -+ TXN_ABORT( bdb->bi_cache.c_txn ); -+ bdb->bi_cache.c_txn = NULL; -+ } -+ bdb_reader_flush( bdb->bi_dbenv ); -+ } -+ - while( bdb->bi_databases && bdb->bi_ndatabases-- ) { - db = bdb->bi_databases[bdb->bi_ndatabases]; - rc = db->bdi_db->close( db->bdi_db, 0 ); -@@ -614,13 +625,6 @@ - - /* close db environment */ - if( bdb->bi_dbenv ) { -- /* Free cache locker if we enabled locking */ -- if ( !( slapMode & SLAP_TOOL_QUICK ) && bdb->bi_cache.c_txn ) { -- TXN_ABORT( bdb->bi_cache.c_txn ); -- bdb->bi_cache.c_txn = NULL; -- } -- bdb_reader_flush( bdb->bi_dbenv ); -- - /* force a checkpoint, but not if we were ReadOnly, - * and not in Quick mode since there are no transactions there. - */ -Index: servers/slapd/backend.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/backend.c,v -retrieving revision 1.403 -retrieving revision 1.404 -diff -u -r1.403 -r1.404 ---- servers/slapd/backend.c 2 Nov 2008 06:58:50 -0000 1.403 -+++ servers/slapd/backend.c 3 Nov 2008 12:23:05 -0000 1.404 -@@ -349,11 +349,13 @@ - } - - if ( be->bd_info->bi_db_close ) { -- be->bd_info->bi_db_close( be, NULL ); -+ rc = be->bd_info->bi_db_close( be, NULL ); -+ if ( rc ) return rc; - } - - if( be->bd_info->bi_close ) { -- be->bd_info->bi_close( be->bd_info ); -+ rc = be->bd_info->bi_close( be->bd_info ); -+ if ( rc ) return rc; - } - - return 0; -Index: servers/slapd/slapacl.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapacl.c,v -retrieving revision 1.31 -retrieving revision 1.32 -diff -u -r1.31 -r1.32 ---- servers/slapd/slapacl.c 7 Jan 2008 23:20:09 -0000 1.31 -+++ servers/slapd/slapacl.c 3 Nov 2008 12:23:05 -0000 1.32 -@@ -399,7 +399,8 @@ - } - } - -- slap_tool_destroy(); -+ if ( slap_tool_destroy()) -+ rc = EXIT_FAILURE; - - return rc; - } -Index: servers/slapd/slapadd.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapadd.c,v -retrieving revision 1.54 -retrieving revision 1.55 -diff -u -r1.54 -r1.55 ---- servers/slapd/slapadd.c 22 Mar 2008 15:01:23 -0000 1.54 -+++ servers/slapd/slapadd.c 3 Nov 2008 12:23:05 -0000 1.55 -@@ -447,7 +447,8 @@ - } - } - -- slap_tool_destroy(); -+ if ( slap_tool_destroy()) -+ rc = EXIT_FAILURE; - - return rc; - } -Index: servers/slapd/slapauth.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapauth.c,v -retrieving revision 1.13 -retrieving revision 1.14 -diff -u -r1.13 -r1.14 ---- servers/slapd/slapauth.c 7 Jan 2008 23:20:09 -0000 1.13 -+++ servers/slapd/slapauth.c 3 Nov 2008 12:23:05 -0000 1.14 -@@ -166,7 +166,8 @@ - if ( !BER_BVISNULL( &authzID ) ) { - op->o_tmpfree( authzID.bv_val, op->o_tmpmemctx ); - } -- slap_tool_destroy(); -+ if ( slap_tool_destroy()) -+ rc = EXIT_FAILURE; - - return rc; - } -Index: servers/slapd/slapcat.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapcat.c,v -retrieving revision 1.12 -retrieving revision 1.13 -diff -u -r1.12 -r1.13 ---- servers/slapd/slapcat.c 11 Apr 2008 10:20:01 -0000 1.12 -+++ servers/slapd/slapcat.c 3 Nov 2008 12:23:05 -0000 1.13 -@@ -134,6 +134,7 @@ - - be->be_entry_close( be ); - -- slap_tool_destroy(); -+ if ( slap_tool_destroy()) -+ rc = EXIT_FAILURE; - return rc; - } -Index: servers/slapd/slapcommon.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapcommon.c,v -retrieving revision 1.88 -retrieving revision 1.89 -diff -u -r1.88 -r1.89 ---- servers/slapd/slapcommon.c 7 Jan 2008 23:20:09 -0000 1.88 -+++ servers/slapd/slapcommon.c 3 Nov 2008 12:23:05 -0000 1.89 -@@ -740,13 +740,16 @@ - } - } - --void slap_tool_destroy( void ) -+int slap_tool_destroy( void ) - { -+ int rc = 0; - if ( !dryrun ) { - if ( need_shutdown ) { -- slap_shutdown( be ); -+ if ( slap_shutdown( be )) -+ rc = EXIT_FAILURE; - } -- slap_destroy(); -+ if ( slap_destroy()) -+ rc = EXIT_FAILURE; - } - #ifdef SLAPD_MODULES - if ( slapMode == SLAP_SERVER_MODE ) { -@@ -772,4 +775,5 @@ - if ( ldiffp && ldiffp != &dummy ) { - ldif_close( ldiffp ); - } -+ return rc; - } -Index: servers/slapd/slapcommon.h -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapcommon.h,v -retrieving revision 1.19 -retrieving revision 1.20 -diff -u -r1.19 -r1.20 ---- servers/slapd/slapcommon.h 7 Jan 2008 23:20:09 -0000 1.19 -+++ servers/slapd/slapcommon.h 3 Nov 2008 12:23:05 -0000 1.20 -@@ -101,6 +101,6 @@ - int tool, - int argc, char **argv )); - --void slap_tool_destroy LDAP_P((void)); -+int slap_tool_destroy LDAP_P((void)); - - #endif /* SLAPCOMMON_H_ */ -Index: servers/slapd/slapdn.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapdn.c,v -retrieving revision 1.10 -retrieving revision 1.11 -diff -u -r1.10 -r1.11 ---- servers/slapd/slapdn.c 7 Jan 2008 23:20:09 -0000 1.10 -+++ servers/slapd/slapdn.c 3 Nov 2008 12:23:05 -0000 1.11 -@@ -99,7 +99,8 @@ - } - } - -- slap_tool_destroy(); -+ if ( slap_tool_destroy()) -+ rc = EXIT_FAILURE; - - return rc; - } -Index: servers/slapd/slapindex.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slapindex.c,v -retrieving revision 1.7 -retrieving revision 1.8 -diff -u -r1.7 -r1.8 ---- servers/slapd/slapindex.c 7 Jan 2008 23:20:09 -0000 1.7 -+++ servers/slapd/slapindex.c 3 Nov 2008 12:23:05 -0000 1.8 -@@ -99,6 +99,7 @@ - - (void) be->be_entry_close( be ); - -- slap_tool_destroy(); -+ if ( slap_tool_destroy()) -+ rc = EXIT_FAILURE; - return( rc ); - } -Index: servers/slapd/slaptest.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slaptest.c,v -retrieving revision 1.11 -retrieving revision 1.12 -diff -u -r1.11 -r1.12 ---- servers/slapd/slaptest.c 7 Jan 2008 23:20:09 -0000 1.11 -+++ servers/slapd/slaptest.c 3 Nov 2008 12:23:05 -0000 1.12 -@@ -108,7 +108,8 @@ - fprintf( stderr, "config file testing succeeded\n"); - } - -- slap_tool_destroy(); -+ if ( slap_tool_destroy()) -+ rc = EXIT_FAILURE; - - return rc; - } diff --git a/slapd-ldap_back_entry_get_rw-ITS6003.diff b/slapd-ldap_back_entry_get_rw-ITS6003.diff new file mode 100644 index 0000000..83d9da0 --- /dev/null +++ b/slapd-ldap_back_entry_get_rw-ITS6003.diff @@ -0,0 +1,19 @@ +Index: servers/slapd/back-ldap/search.c +=================================================================== +RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-ldap/search.c,v +retrieving revision 1.201.2.20 +retrieving revision 1.201.2.21 +diff -u -r1.201.2.20 -r1.201.2.21 +--- servers/slapd/back-ldap/search.c 5 Mar 2009 18:22:14 -0000 1.201.2.20 ++++ servers/slapd/back-ldap/search.c 6 Mar 2009 07:14:56 -0000 1.201.2.21 +@@ -929,8 +929,8 @@ + + /* TODO: timeout? */ + rc = ldap_pvt_search_s( lc->lc_ld, ndn->bv_val, LDAP_SCOPE_BASE, filter, +- attrp, 0, ctrls, NULL, +- NULL, LDAP_NO_LIMIT, op->ors_deref, &result ); ++ attrp, LDAP_DEREF_NEVER, ctrls, NULL, ++ NULL, LDAP_NO_LIMIT, 0, &result ); + if ( rc != LDAP_SUCCESS ) { + if ( rc == LDAP_SERVER_DOWN && do_retry ) { + do_retry = 0; diff --git a/slapd-privdb-config-its5736.dif b/slapd-privdb-config-its5736.dif deleted file mode 100644 index 22ba9f6..0000000 --- a/slapd-privdb-config-its5736.dif +++ /dev/null @@ -1,267 +0,0 @@ -Index: servers/slapd/overlays/translucent.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/translucent.c,v -retrieving revision 1.54 -retrieving revision 1.55 -diff -u -r1.54 -r1.55 ---- servers/slapd/overlays/translucent.c 6 Oct 2008 23:59:52 -0000 1.54 -+++ servers/slapd/overlays/translucent.c 12 Oct 2008 18:20:47 -0000 1.55 -@@ -95,14 +95,6 @@ - { NULL, NULL, 0, 0, 0, ARG_IGNORED } - }; - --static ConfigTable transdummy[] = { -- { "", "", 0, 0, 0, ARG_IGNORED, -- NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' " -- "DESC 'The backend type for a database instance' " -- "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL }, -- { NULL, NULL, 0, 0, 0, ARG_IGNORED } --}; -- - static ConfigOCs translucentocs[] = { - { "( OLcfgOvOc:14.1 " - "NAME 'olcTranslucentConfig' " -@@ -115,7 +107,7 @@ - { "( OLcfgOvOc:14.2 " - "NAME 'olcTranslucentDatabase' " - "DESC 'Translucent target database configuration' " -- "AUXILIARY )", Cft_Misc, transdummy, translucent_ldadd }, -+ "AUXILIARY )", Cft_Misc, olcDatabaseDummy, translucent_ldadd }, - { NULL, 0, NULL } - }; - /* for translucent_init() */ -Index: servers/slapd/overlays/pcache.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/pcache.c,v -retrieving revision 1.153 -retrieving revision 1.154 -diff -u -r1.153 -r1.154 ---- servers/slapd/overlays/pcache.c 4 Sep 2008 05:43:19 -0000 1.153 -+++ servers/slapd/overlays/pcache.c 12 Oct 2008 18:20:47 -0000 1.154 -@@ -2655,15 +2655,6 @@ - { NULL, NULL, 0, 0, 0, ARG_IGNORED } - }; - --/* Need to no-op this keyword for dynamic config */ --static ConfigTable pcdummy[] = { -- { "", "", 0, 0, 0, ARG_IGNORED, -- NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' " -- "DESC 'The backend type for a database instance' " -- "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL }, -- { NULL, NULL, 0, 0, 0, ARG_IGNORED } --}; -- - static ConfigOCs pcocs[] = { - { "( OLcfgOvOc:2.1 " - "NAME 'olcPcacheConfig' " -@@ -2675,7 +2666,7 @@ - { "( OLcfgOvOc:2.2 " - "NAME 'olcPcacheDatabase' " - "DESC 'Cache database configuration' " -- "AUXILIARY )", Cft_Misc, pcdummy, pc_ldadd }, -+ "AUXILIARY )", Cft_Misc, olcDatabaseDummy, pc_ldadd }, - { NULL, 0, NULL } - }; - -@@ -3995,11 +3986,6 @@ - code = config_register_schema( pccfg, pcocs ); - if ( code ) return code; - -- { -- const char *text; -- code = slap_str2ad( "olcDatabase", &pcdummy[0].ad, &text ); -- if ( code ) return code; -- } - return overlay_register( &pcache ); - } - -Index: servers/slapd/back-monitor/database.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-monitor/database.c,v -retrieving revision 1.97 -retrieving revision 1.98 -diff -u -r1.97 -r1.98 ---- servers/slapd/back-monitor/database.c 26 May 2008 18:53:16 -0000 1.97 -+++ servers/slapd/back-monitor/database.c 12 Oct 2008 18:20:46 -0000 1.98 -@@ -160,12 +160,12 @@ - "monitor_subsys_database_init: " - "missing suffix for %s\n", - rdnval, 0, 0 ); -- return -1; -- } -- attr_merge( e, slap_schema.si_ad_namingContexts, -+ } else { -+ attr_merge( e, slap_schema.si_ad_namingContexts, - be->be_suffix, be->be_nsuffix ); -- attr_merge( e_database, slap_schema.si_ad_namingContexts, -+ attr_merge( e_database, slap_schema.si_ad_namingContexts, - be->be_suffix, be->be_nsuffix ); -+ } - } - - (void)init_readOnly( mi, e, be->be_restrictops ); -Index: servers/slapd/back-ldap/chain.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-ldap/chain.c,v -retrieving revision 1.69 -retrieving revision 1.70 -diff -u -r1.69 -r1.70 ---- servers/slapd/back-ldap/chain.c 7 Jan 2008 23:20:11 -0000 1.69 -+++ servers/slapd/back-ldap/chain.c 12 Oct 2008 18:20:46 -0000 1.70 -@@ -63,6 +63,7 @@ - LDAP_CH_RES, - LDAP_CH_ERR - } ldap_chain_status_t; -+ - static BackendInfo *lback; - - typedef struct ldap_chain_t { -@@ -1096,7 +1097,7 @@ - "NAME 'olcChainDatabase' " - "DESC 'Chain remote server configuration' " - "AUXILIARY )", -- Cft_Misc, chaincfg, chain_ldadd }, -+ Cft_Misc, olcDatabaseDummy, chain_ldadd }, - { NULL, 0, NULL } - }; - -@@ -1187,6 +1188,8 @@ - } - } - -+ ca->ca_private = on; -+ - done:; - if ( rc != LDAP_SUCCESS ) { - (void)ldap_chain_db_destroy_one( ca->be, NULL ); -@@ -1510,17 +1513,11 @@ - ldap_chain_t *lc = NULL; - - if ( lback == NULL ) { -- static BackendInfo lback2; -- - lback = backend_info( "ldap" ); - - if ( lback == NULL ) { - return 1; - } -- -- lback2 = *lback; -- lback2.bi_type = ldapchain.on_bi.bi_type; -- lback = &lback2; - } - - lc = ch_malloc( sizeof( ldap_chain_t ) ); -@@ -2062,7 +2059,8 @@ - int - chain_initialize( void ) - { -- int rc; -+ int rc; -+ const char *text; - - /* Make sure we don't exceed the bits reserved for userland */ - config_check_userland( CH_LAST ); -Index: servers/slapd/config.h -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/config.h,v -retrieving revision 1.50 -retrieving revision 1.51 -diff -u -r1.50 -r1.51 ---- servers/slapd/config.h 18 Feb 2008 22:11:12 -0000 1.50 -+++ servers/slapd/config.h 12 Oct 2008 18:20:46 -0000 1.51 -@@ -201,6 +201,8 @@ - extern slap_verbmasks *slap_ldap_response_code; - extern int slap_ldap_response_code_register( struct berval *bv, int err ); - -+extern ConfigTable olcDatabaseDummy[]; -+ - LDAP_END_DECL - - #endif /* CONFIG_H */ -Index: servers/slapd/bconfig.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/bconfig.c,v -retrieving revision 1.348 -retrieving revision 1.350 -diff -u -r1.348 -r1.350 ---- servers/slapd/bconfig.c 29 Sep 2008 20:08:29 -0000 1.348 -+++ servers/slapd/bconfig.c 12 Oct 2008 18:20:46 -0000 1.350 -@@ -696,6 +696,15 @@ - NULL, NULL, NULL, NULL } - }; - -+/* Need to no-op this keyword for dynamic config */ -+ConfigTable olcDatabaseDummy[] = { -+ { "", "", 0, 0, 0, ARG_IGNORED, -+ NULL, "( OLcfgGlAt:13 NAME 'olcDatabase' " -+ "DESC 'The backend type for a database instance' " -+ "SUP olcBackend SINGLE-VALUE X-ORDERED 'SIBLINGS' )", NULL, NULL }, -+ { NULL, NULL, 0, 0, 0, ARG_IGNORED } -+}; -+ - /* Routines to check if a child can be added to this type */ - static ConfigLDAPadd cfAddSchema, cfAddInclude, cfAddDatabase, - cfAddBackend, cfAddModule, cfAddOverlay; -@@ -3253,7 +3262,7 @@ - ConfigArgs *ca; - Entry *frontend; - Entry *config; -- int got_frontend; -+ int got_frontend; - int got_config; - } setup_cookie; - -@@ -3262,15 +3271,18 @@ - { - if ( rs->sr_type == REP_SEARCH ) { - setup_cookie *sc = op->o_callback->sc_private; -+ struct berval pdn; - - sc->cfb->cb_got_ldif = 1; - /* Does the frontend exist? */ - if ( !sc->got_frontend ) { - if ( !strncmp( rs->sr_entry->e_nname.bv_val, -- "olcDatabase", STRLENOF( "olcDatabase" ))) { -+ "olcDatabase", STRLENOF( "olcDatabase" ))) -+ { - if ( strncmp( rs->sr_entry->e_nname.bv_val + - STRLENOF( "olcDatabase" ), "={-1}frontend", -- STRLENOF( "={-1}frontend" ))) { -+ STRLENOF( "={-1}frontend" ))) -+ { - struct berval rdn; - int i = op->o_noop; - sc->ca->be = frontendDB; -@@ -3293,13 +3305,19 @@ - } - } - } -+ -+ dnParent( &rs->sr_entry->e_nname, &pdn ); -+ - /* Does the configDB exist? */ - if ( sc->got_frontend && !sc->got_config && - !strncmp( rs->sr_entry->e_nname.bv_val, -- "olcDatabase", STRLENOF( "olcDatabase" ))) { -+ "olcDatabase", STRLENOF( "olcDatabase" )) && -+ dn_match( &config_rdn, &pdn ) ) -+ { - if ( strncmp( rs->sr_entry->e_nname.bv_val + - STRLENOF( "olcDatabase" ), "={0}config", -- STRLENOF( "={0}config" ))) { -+ STRLENOF( "={0}config" ))) -+ { - struct berval rdn; - int i = op->o_noop; - sc->ca->be = LDAP_STAILQ_FIRST( &backendDB ); -@@ -6466,6 +6484,9 @@ - i = config_register_schema( ct, cf_ocs ); - if ( i ) return i; - -+ i = slap_str2ad( "olcDatabase", &olcDatabaseDummy[0].ad, &text ); -+ if ( i ) return i; -+ - /* setup olcRootPW to be base64-encoded when written in LDIF form; - * basically, we don't care if it fails */ - i = slap_str2ad( "olcRootPW", &ad, &text ); diff --git a/slapd_getaddrinfo_dupl.dif b/slapd_getaddrinfo_dupl.dif new file mode 100644 index 0000000..6b9591b --- /dev/null +++ b/slapd_getaddrinfo_dupl.dif @@ -0,0 +1,102 @@ +Index: openldap-2.4.7/servers/slapd/daemon.c +=================================================================== +--- openldap-2.4.7.orig/servers/slapd/daemon.c ++++ openldap-2.4.7/servers/slapd/daemon.c +@@ -1120,7 +1120,8 @@ slap_get_listener_addresses( + { + #ifdef HAVE_GETADDRINFO + struct addrinfo hints, *res, *sai; +- int n, err; ++ struct sockaddr **sap2; ++ int n, err, cmpres; + char serv[7]; + + memset( &hints, '\0', sizeof(hints) ); +@@ -1146,43 +1147,60 @@ slap_get_listener_addresses( + *sap = NULL; + + for ( sai=res; sai; sai=sai->ai_next ) { ++ cmpres=1; + if( sai->ai_addr == NULL ) { + Debug( LDAP_DEBUG_ANY, "slap_get_listener_addresses: " + "getaddrinfo ai_addr is NULL?\n", 0, 0, 0 ); + freeaddrinfo(res); + goto errexit; + } +- +- switch (sai->ai_family) { +-# ifdef LDAP_PF_INET6 +- case AF_INET6: +- *sap = ch_malloc(sizeof(struct sockaddr_in6)); +- if (*sap == NULL) { +- freeaddrinfo(res); +- goto errexit; ++ /* check for duplicates */ ++ for ( sap2 = *sal; sap && *sap2; sap2++ ){ ++ if ( sai->ai_family == (*sap2)->sa_family ) { ++ if (sai->ai_family == AF_INET6) { ++ cmpres = memcmp(sai->ai_addr, *sap2, ++ sizeof(struct sockaddr_in6)); ++ } else if (sai->ai_family == AF_INET) { ++ cmpres = memcmp(sai->ai_addr, *sap2, ++ sizeof(struct sockaddr_in)); ++ } ++ if (! cmpres ){ ++ break; ++ } + } +- *(struct sockaddr_in6 *)*sap = +- *((struct sockaddr_in6 *)sai->ai_addr); +- break; ++ } ++ if (cmpres){ ++ switch (sai->ai_family) { ++# ifdef LDAP_PF_INET6 ++ case AF_INET6: ++ *sap = ch_malloc(sizeof(struct sockaddr_in6)); ++ if (*sap == NULL) { ++ freeaddrinfo(res); ++ goto errexit; ++ } ++ *(struct sockaddr_in6 *)*sap = ++ *((struct sockaddr_in6 *)sai->ai_addr); ++ break; + # endif /* LDAP_PF_INET6 */ +- case AF_INET: +- *sap = ch_malloc(sizeof(struct sockaddr_in)); +- if (*sap == NULL) { +- freeaddrinfo(res); +- goto errexit; ++ case AF_INET: ++ *sap = ch_malloc(sizeof(struct sockaddr_in)); ++ if (*sap == NULL) { ++ freeaddrinfo(res); ++ goto errexit; ++ } ++ *(struct sockaddr_in *)*sap = ++ *((struct sockaddr_in *)sai->ai_addr); ++ break; ++ default: ++ *sap = NULL; ++ break; + } +- *(struct sockaddr_in *)*sap = +- *((struct sockaddr_in *)sai->ai_addr); +- break; +- default: +- *sap = NULL; +- break; +- } + +- if (*sap != NULL) { +- (*sap)->sa_family = sai->ai_family; +- sap++; +- *sap = NULL; ++ if (*sap != NULL) { ++ (*sap)->sa_family = sai->ai_family; ++ sap++; ++ *sap = NULL; ++ } + } + } + diff --git a/slapo-chain-dangling-its5742.dif b/slapo-chain-dangling-its5742.dif deleted file mode 100644 index 3f986f3..0000000 --- a/slapo-chain-dangling-its5742.dif +++ /dev/null @@ -1,138 +0,0 @@ -Index: servers/slapd/result.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/result.c,v -retrieving revision 1.316 -retrieving revision 1.317 -diff -u -r1.316 -r1.317 ---- servers/slapd/result.c 13 Oct 2008 08:18:15 -0000 1.316 -+++ servers/slapd/result.c 16 Oct 2008 22:03:17 -0000 1.317 -@@ -1273,6 +1273,7 @@ - BerElement *ber = (BerElement *) &berbuf; - int rc = 0; - int bytes; -+ char *edn = rs->sr_entry ? rs->sr_entry->e_name.bv_val : "(null)"; - - AttributeDescription *ad_ref = slap_schema.si_ad_ref; - AttributeDescription *ad_entry = slap_schema.si_ad_entry; -@@ -1287,7 +1288,7 @@ - - Debug( LDAP_DEBUG_TRACE, - "=> send_search_reference: dn=\"%s\"\n", -- rs->sr_entry ? rs->sr_entry->e_name.bv_val : "(null)", 0, 0 ); -+ edn, 0, 0 ); - - if ( rs->sr_entry && ! access_allowed( op, rs->sr_entry, - ad_entry, NULL, ACL_READ, NULL ) ) -@@ -1313,7 +1314,7 @@ - if( op->o_domain_scope ) { - Debug( LDAP_DEBUG_ANY, - "send_search_reference: domainScope control in (%s)\n", -- rs->sr_entry->e_dn, 0, 0 ); -+ edn, 0, 0 ); - rc = 0; - goto rel; - } -@@ -1321,7 +1322,7 @@ - if( rs->sr_ref == NULL ) { - Debug( LDAP_DEBUG_ANY, - "send_search_reference: null ref in (%s)\n", -- rs->sr_entry ? rs->sr_entry->e_dn : "(null)", 0, 0 ); -+ edn, 0, 0 ); - rc = 1; - goto rel; - } -@@ -1371,6 +1372,7 @@ - - rc = 0; - if ( rs->sr_flags & REP_ENTRY_MUSTRELEASE ) { -+ assert( rs->sr_entry != NULL ); - be_entry_release_rw( op, rs->sr_entry, 0 ); - rs->sr_flags ^= REP_ENTRY_MUSTRELEASE; - rs->sr_entry = NULL; -@@ -1520,8 +1522,8 @@ - LDAPControl c; - Operation myop; - -- Debug( LDAP_DEBUG_ANY, "slap_read_controls: (%s) %s\n", -- oid->bv_val, e->e_dn, 0 ); -+ Debug( LDAP_DEBUG_ANY, "%s slap_read_controls: (%s) %s\n", -+ op->o_log_prefix, oid->bv_val, e->e_dn ); - - rs->sr_entry = e; - rs->sr_attrs = ( oid == &slap_pre_read_bv ) ? -Index: servers/slapd/back-ldap/chain.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/back-ldap/chain.c,v -retrieving revision 1.70 -retrieving revision 1.71 -diff -u -r1.70 -r1.71 ---- servers/slapd/back-ldap/chain.c 12 Oct 2008 18:20:46 -0000 1.70 -+++ servers/slapd/back-ldap/chain.c 16 Oct 2008 22:06:12 -0000 1.71 -@@ -597,6 +597,8 @@ - struct berval odn = op->o_req_dn, - ondn = op->o_req_ndn; - slap_response *save_response = op->o_callback->sc_response; -+ Entry *save_entry = rs->sr_entry; -+ slap_mask_t save_flags = rs->sr_flags; - - int rc = LDAP_OTHER, - first_rc = -1; -@@ -761,7 +763,8 @@ - op->o_req_ndn = ondn; - op->o_callback->sc_response = save_response; - rs->sr_type = REP_SEARCHREF; -- rs->sr_entry = NULL; -+ rs->sr_entry = save_entry; -+ rs->sr_flags = save_flags; - - if ( rc != LDAP_SUCCESS ) { - /* couldn't chase any of the referrals */ -Index: tests/scripts/test032-chain -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/tests/scripts/test032-chain,v -retrieving revision 1.13 -retrieving revision 1.14 -diff -u -r1.13 -r1.14 ---- tests/scripts/test032-chain 7 Jan 2008 23:20:17 -0000 1.13 -+++ tests/scripts/test032-chain 16 Oct 2008 22:07:15 -0000 1.14 -@@ -128,7 +128,7 @@ - exit 1 - fi - -- echo "Reading the referral entry "ou=Other,$BASEDN" as anonymous on port $P..." -+ echo "Reading the referral entry \"ou=Other,$BASEDN\" as anonymous on port $P..." - $LDAPSEARCH -h $LOCALHOST -p $P -b "ou=Other,$BASEDN" -S "" \ - > $SEARCHOUT 2>&1 - -@@ -304,6 +304,31 @@ - exit $RC - fi - -+# ITS#57?? -+$LDAPADD -h $LOCALHOST -p $PORT1 \ -+ -D "$MANAGERDN" -w secret \ -+ >> $TESTOUT 2>&1 \ -+ << EOMODS -+dn: ou=Can't Contact,dc=example,dc=com -+changetype: add -+objectclass: referral -+objectclass: extensibleobject -+ou: Can't Contact -+# invalid URI to test broken connectivity handling (search only) -+ref: ${URI3}ou=Can't%20Contact,dc=example,dc=com -+EOMODS -+ -+echo "Reading the referral entry \"ou=Can't Contact,$BASEDN\" as anonymous on port $PORT1..." -+$LDAPSEARCH -h $LOCALHOST -p $PORT1 -b "$BASEDN" -S "" "(cn=Can't Contact)" \ -+ > $SEARCHOUT 2>&1 -+ -+RC=$? -+if test $RC != 0 ; then -+ echo "ldapsearch failed ($RC)!" -+ test $KILLSERVERS != no && kill -HUP $KILLPIDS -+ exit $RC -+fi -+ - test $KILLSERVERS != no && kill -HUP $KILLPIDS - - echo ">>>>> Test succeeded" diff --git a/slapo-syncprov-skip-its5709.dif b/slapo-syncprov-skip-its5709.dif deleted file mode 100644 index 826639a..0000000 --- a/slapo-syncprov-skip-its5709.dif +++ /dev/null @@ -1,296 +0,0 @@ -Index: servers/slapd/proto-slap.h -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/proto-slap.h,v -retrieving revision 1.762 -retrieving revision 1.763 -diff -u -r1.762 -r1.763 ---- servers/slapd/proto-slap.h 1 Nov 2008 14:16:49 -0000 1.762 -+++ servers/slapd/proto-slap.h 2 Nov 2008 21:16:20 -0000 1.763 -@@ -804,7 +804,7 @@ - LDAP_SLAPD_V( const struct berval ) slap_ldapsync_bv; - LDAP_SLAPD_V( const struct berval ) slap_ldapsync_cn_bv; - LDAP_SLAPD_F (void) slap_get_commit_csn LDAP_P(( -- Operation *, struct berval *maxcsn )); -+ Operation *, struct berval *maxcsn, int *foundit )); - LDAP_SLAPD_F (void) slap_rewind_commit_csn LDAP_P(( Operation * )); - LDAP_SLAPD_F (void) slap_graduate_commit_csn LDAP_P(( Operation * )); - LDAP_SLAPD_F (Entry *) slap_create_context_csn_entry LDAP_P(( Backend *, struct berval *)); -Index: servers/slapd/overlays/syncprov.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/syncprov.c,v -retrieving revision 1.249 -retrieving revision 1.250 -diff -u -r1.249 -r1.250 ---- servers/slapd/overlays/syncprov.c 28 Oct 2008 19:33:46 -0000 1.249 -+++ servers/slapd/overlays/syncprov.c 2 Nov 2008 14:26:25 -0000 1.250 -@@ -1604,12 +1604,12 @@ - { - struct berval maxcsn = BER_BVNULL; - char cbuf[LDAP_LUTIL_CSNSTR_BUFSIZE]; -- int do_check = 0, have_psearches; -+ int do_check = 0, have_psearches, foundit; - - /* Update our context CSN */ - cbuf[0] = '\0'; - ldap_pvt_thread_rdwr_wlock( &si->si_csn_rwlock ); -- slap_get_commit_csn( op, &maxcsn ); -+ slap_get_commit_csn( op, &maxcsn, &foundit ); - if ( BER_BVISNULL( &maxcsn ) && SLAP_GLUE_SUBORDINATE( op->o_bd )) { - /* syncrepl queues the CSN values in the db where - * it is configured , not where the changes are made. -@@ -1618,7 +1618,7 @@ - */ - BackendDB *be = op->o_bd; - op->o_bd = select_backend( &be->be_nsuffix[0], 1); -- slap_get_commit_csn( op, &maxcsn ); -+ slap_get_commit_csn( op, &maxcsn, &foundit ); - op->o_bd = be; - } - if ( !BER_BVISNULL( &maxcsn ) ) { -@@ -1641,7 +1641,7 @@ - sizeof(int)); - si->si_sids[i] = sid; - } -- } else { -+ } else if ( !foundit ) { - /* internal ops that aren't meant to be replicated */ - ldap_pvt_thread_rdwr_wunlock( &si->si_csn_rwlock ); - return SLAP_CB_CONTINUE; -@@ -1678,8 +1678,11 @@ - ldap_pvt_thread_rdwr_runlock( &si->si_csn_rwlock ); - } - -- opc->sctxcsn.bv_len = maxcsn.bv_len; -- opc->sctxcsn.bv_val = cbuf; -+ /* only update consumer ctx if this is the greatest csn */ -+ if ( bvmatch( &maxcsn, &op->o_csn )) { -+ opc->sctxcsn.bv_len = maxcsn.bv_len; -+ opc->sctxcsn.bv_val = cbuf; -+ } - - /* Handle any persistent searches */ - ldap_pvt_thread_mutex_lock( &si->si_ops_mutex ); -Index: servers/slapd/ctxcsn.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/ctxcsn.c,v -retrieving revision 1.47 -retrieving revision 1.50 -diff -u -r1.47 -r1.50 ---- servers/slapd/ctxcsn.c 10 Feb 2008 01:18:22 -0000 1.47 -+++ servers/slapd/ctxcsn.c 2 Nov 2008 21:16:20 -0000 1.50 -@@ -33,71 +33,72 @@ - void - slap_get_commit_csn( - Operation *op, -- struct berval *maxcsn -+ struct berval *maxcsn, -+ int *foundit - ) - { - struct slap_csn_entry *csne, *committed_csne = NULL; -+ BackendDB *be = op->o_bd->bd_self; - - if ( maxcsn ) { - BER_BVZERO( maxcsn ); - } -+ if ( foundit ) { -+ *foundit = 0; -+ } - -- ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_lock( &be->be_pcl_mutex ); - -- LDAP_TAILQ_FOREACH( csne, op->o_bd->be_pending_csn_list, ce_csn_link ) { -+ LDAP_TAILQ_FOREACH( csne, be->be_pending_csn_list, ce_csn_link ) { - if ( csne->ce_opid == op->o_opid && csne->ce_connid == op->o_connid ) { - csne->ce_state = SLAP_CSN_COMMIT; -+ if ( foundit ) *foundit = 1; - break; - } - } - -- LDAP_TAILQ_FOREACH( csne, op->o_bd->be_pending_csn_list, ce_csn_link ) { -+ LDAP_TAILQ_FOREACH( csne, be->be_pending_csn_list, ce_csn_link ) { - if ( csne->ce_state == SLAP_CSN_COMMIT ) committed_csne = csne; - if ( csne->ce_state == SLAP_CSN_PENDING ) break; - } - - if ( committed_csne && maxcsn ) *maxcsn = committed_csne->ce_csn; -- ldap_pvt_thread_mutex_unlock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_unlock( &be->be_pcl_mutex ); - } - - void - slap_rewind_commit_csn( Operation *op ) - { - struct slap_csn_entry *csne; -+ BackendDB *be = op->o_bd->bd_self; - -- ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_lock( &be->be_pcl_mutex ); - -- LDAP_TAILQ_FOREACH( csne, op->o_bd->be_pending_csn_list, ce_csn_link ) { -+ LDAP_TAILQ_FOREACH( csne, be->be_pending_csn_list, ce_csn_link ) { - if ( csne->ce_opid == op->o_opid && csne->ce_connid == op->o_connid ) { - csne->ce_state = SLAP_CSN_PENDING; - break; - } - } - -- ldap_pvt_thread_mutex_unlock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_unlock( &be->be_pcl_mutex ); - } - - void - slap_graduate_commit_csn( Operation *op ) - { - struct slap_csn_entry *csne; -+ BackendDB *be; - - if ( op == NULL ) return; - if ( op->o_bd == NULL ) return; -+ be = op->o_bd->bd_self; - --#if 0 -- /* it is NULL when we get here from the frontendDB; -- * alternate fix: initialize frontendDB like all other backends */ -- assert( op->o_bd->be_pcl_mutexp != NULL ); --#endif -- -- if ( op->o_bd->be_pcl_mutexp == NULL ) return; -- -- ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_lock( &be->be_pcl_mutex ); - -- LDAP_TAILQ_FOREACH( csne, op->o_bd->be_pending_csn_list, ce_csn_link ) { -+ LDAP_TAILQ_FOREACH( csne, be->be_pending_csn_list, ce_csn_link ) { - if ( csne->ce_opid == op->o_opid && csne->ce_connid == op->o_connid ) { -- LDAP_TAILQ_REMOVE( op->o_bd->be_pending_csn_list, -+ LDAP_TAILQ_REMOVE( be->be_pending_csn_list, - csne, ce_csn_link ); - Debug( LDAP_DEBUG_SYNC, "slap_graduate_commit_csn: removing %p %s\n", - csne->ce_csn.bv_val, csne->ce_csn.bv_val, 0 ); -@@ -110,7 +111,7 @@ - } - } - -- ldap_pvt_thread_mutex_unlock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_unlock( &be->be_pcl_mutex ); - - return; - } -@@ -161,22 +162,23 @@ - struct berval *csn ) - { - struct slap_csn_entry *pending; -+ BackendDB *be = op->o_bd->bd_self; - - pending = (struct slap_csn_entry *) ch_calloc( 1, - sizeof( struct slap_csn_entry )); - - Debug( LDAP_DEBUG_SYNC, "slap_queue_csn: queing %p %s\n", csn->bv_val, csn->bv_val, 0 ); - -- ldap_pvt_thread_mutex_lock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_lock( &be->be_pcl_mutex ); - - ber_dupbv( &pending->ce_csn, csn ); - ber_bvreplace_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; -- LDAP_TAILQ_INSERT_TAIL( op->o_bd->be_pending_csn_list, -+ LDAP_TAILQ_INSERT_TAIL( be->be_pending_csn_list, - pending, ce_csn_link ); -- ldap_pvt_thread_mutex_unlock( op->o_bd->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_unlock( &be->be_pcl_mutex ); - } - - int -Index: servers/slapd/frontend.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/frontend.c,v -retrieving revision 1.26 -retrieving revision 1.27 -diff -u -r1.26 -r1.27 ---- servers/slapd/frontend.c 19 Sep 2008 18:37:11 -0000 1.26 -+++ servers/slapd/frontend.c 2 Nov 2008 06:58:50 -0000 1.27 -@@ -108,11 +108,7 @@ - frontendDB->be_def_limit.lms_s_pr_hide = 0; /* don't hide number of entries left */ - frontendDB->be_def_limit.lms_s_pr_total = 0; /* number of total entries returned by pagedResults equal to hard limit */ - --#if 0 -- /* FIXME: do we need this? */ -- frontendDB->be_pcl_mutexp = &frontendDB->be_pcl_mutex; -- ldap_pvt_thread_mutex_init( frontendDB->be_pcl_mutexp ); --#endif -+ ldap_pvt_thread_mutex_init( &frontendDB->be_pcl_mutex ); - - /* suffix */ - frontendDB->be_suffix = ch_calloc( 2, sizeof( struct berval ) ); -Index: servers/slapd/slap.h -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/slap.h,v -retrieving revision 1.860 -retrieving revision 1.861 -diff -u -r1.860 -r1.861 ---- servers/slapd/slap.h 1 Nov 2008 14:16:49 -0000 1.860 -+++ servers/slapd/slap.h 2 Nov 2008 06:58:50 -0000 1.861 -@@ -1895,7 +1895,6 @@ - BerVarray be_update_refs; /* where to refer modifying clients to */ - struct be_pcl *be_pending_csn_list; - ldap_pvt_thread_mutex_t be_pcl_mutex; -- ldap_pvt_thread_mutex_t *be_pcl_mutexp; - struct syncinfo_s *be_syncinfo; /* For syncrepl */ - - void *be_pb; /* Netscape plugin */ -Index: servers/slapd/overlays/pcache.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/pcache.c,v -retrieving revision 1.157 -retrieving revision 1.158 -diff -u -r1.157 -r1.158 ---- servers/slapd/overlays/pcache.c 24 Oct 2008 16:57:38 -0000 1.157 -+++ servers/slapd/overlays/pcache.c 2 Nov 2008 06:58:50 -0000 1.158 -@@ -3145,7 +3145,7 @@ - cm->db = *be; - SLAP_DBFLAGS(&cm->db) |= SLAP_DBFLAG_NO_SCHEMA_CHECK; - cm->db.be_private = NULL; -- cm->db.be_pcl_mutexp = &cm->db.be_pcl_mutex; -+ cm->db.bd_self = &cm->db; - cm->qm = qm; - cm->numattrsets = 0; - cm->num_entries_limit = 5; -Index: servers/slapd/overlays/translucent.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/overlays/translucent.c,v -retrieving revision 1.56 -retrieving revision 1.57 -diff -u -r1.56 -r1.57 ---- servers/slapd/overlays/translucent.c 17 Oct 2008 15:40:49 -0000 1.56 -+++ servers/slapd/overlays/translucent.c 2 Nov 2008 06:58:50 -0000 1.57 -@@ -1268,7 +1268,6 @@ - on->on_bi.bi_private = ov; - ov->db = *be; - ov->db.be_private = NULL; -- ov->db.be_pcl_mutexp = &ov->db.be_pcl_mutex; - ov->defer_db_open = 1; - - if ( !backend_db_init( "ldap", &ov->db, -1, NULL )) { -Index: servers/slapd/backend.c -=================================================================== -RCS file: /repo/OpenLDAP/pkg/ldap/servers/slapd/backend.c,v -retrieving revision 1.402 -retrieving revision 1.403 -diff -u -r1.402 -r1.403 ---- servers/slapd/backend.c 1 Nov 2008 14:16:49 -0000 1.402 -+++ servers/slapd/backend.c 2 Nov 2008 06:58:50 -0000 1.403 -@@ -594,8 +594,7 @@ - be->be_requires = frontendDB->be_requires; - be->be_ssf_set = frontendDB->be_ssf_set; - -- be->be_pcl_mutexp = &be->be_pcl_mutex; -- ldap_pvt_thread_mutex_init( be->be_pcl_mutexp ); -+ ldap_pvt_thread_mutex_init( &be->be_pcl_mutex ); - - /* assign a default depth limit for alias deref */ - be->be_max_deref_depth = SLAPD_DEFAULT_MAXDEREFDEPTH;