Hello community,
here is the log from the commit of package openldap2 for openSUSE:Factory checked in at 2012-03-01 07:49:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/openldap2 (Old)
and /work/SRC/openSUSE:Factory/.openldap2.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "openldap2", Maintainer is "rhafer@suse.com"
Changes:
--------
--- /work/SRC/openSUSE:Factory/openldap2/openldap2-client.changes 2011-12-08 12:26:58.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.openldap2.new/openldap2-client.changes 2012-03-01 07:49:50.000000000 +0100
@@ -1,0 +2,26 @@
+Mon Feb 27 14:14:23 UTC 2012 - rhafer@suse.de
+
+- Update to 2.4.29
+ * Fixed slapd cn=config modification of first schema element
+ (ITS#7098)
+ * Fixed slapd operation reuse (ITS#7107)
+ * Fixed slapd blocked writers to not interfere with pool pause
+ (ITS#7115)
+ * Fixed slapd connection loop connindex usage (ITS#7131)
+ * Fixed slapd double mutex unlock via connection_done (ITS#7125)
+ * Fixed slapd check order in connection_write (ITS#7113)
+ * Fixed slapd slapadd to exit on failure (ITS#7142)
+ * Fixed slapd syncrepl reference to freed memory
+ (ITS#7127,ITS#7132)
+ * Fixed slapd syncrepl to ignore some errors on delete
+ (ITS#7052)
+ * Fixed slapd syncrepl to handle missing oldRDN (ITS#7144)
+ * Fixed slapd-monitor compare op to update cached entry
+ (ITS#7123)
+ * Fixed slapo-syncprov with already abandoned operation
+ (ITS#7150)
+- Included patches from RE24 branch:
+ * only poll sockets for write as needed (ITS#7167, bnc#749082)
+ * sycnrepl Fixes (ITS#7162)
+
+-------------------------------------------------------------------
openldap2.changes: same change
Old:
----
openldap-2.4.28.tgz
New:
----
0008-syncrepl-fixes-post-2.4.29.dif
0009-ITS-7167-only-poll-sockets-for-write-as-needed.dif
openldap-2.4.29.tgz
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Other differences:
------------------
++++++ openldap2-client.spec ++++++
--- /var/tmp/diff_new_pack.kH5GCu/_old 2012-03-01 07:49:52.000000000 +0100
+++ /var/tmp/diff_new_pack.kH5GCu/_new 2012-03-01 07:49:52.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package openldap2-client
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
%if %sles_version == 9 || %sles_version == 10
BuildRequires: -libopenssl-devel -pwdutils openssl-devel
%endif
-Version: 2.4.28
+Version: 2.4.29
Release: 1
Url: http://www.openldap.org
License: OLDAP-2.8
@@ -60,6 +60,8 @@
Patch5: 0005-pie-compile.dif
Patch6: 0006-No-Build-date-and-time-in-binaries.dif
Patch7: 0007-Recover-on-DB-version-change.dif
+Patch8: 0008-syncrepl-fixes-post-2.4.29.dif
+Patch9: 0009-ITS-7167-only-poll-sockets-for-write-as-needed.dif
Patch100: openldap-2.3.37.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if "%{name}" == "openldap2"
@@ -161,6 +163,8 @@
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+%patch9 -p1
cp %{SOURCE5} .
cp %{SOURCE6} .
cd ../openldap-2.3.37
++++++ openldap2.spec ++++++
--- /var/tmp/diff_new_pack.kH5GCu/_old 2012-03-01 07:49:52.000000000 +0100
+++ /var/tmp/diff_new_pack.kH5GCu/_new 2012-03-01 07:49:52.000000000 +0100
@@ -1,7 +1,7 @@
#
# spec file for package openldap2
#
-# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@@ -24,7 +24,7 @@
%if %sles_version == 9 || %sles_version == 10
BuildRequires: -libopenssl-devel -pwdutils openssl-devel
%endif
-Version: 2.4.28
+Version: 2.4.29
Release: 1
Url: http://www.openldap.org
License: OLDAP-2.8
@@ -60,6 +60,8 @@
Patch5: 0005-pie-compile.dif
Patch6: 0006-No-Build-date-and-time-in-binaries.dif
Patch7: 0007-Recover-on-DB-version-change.dif
+Patch8: 0008-syncrepl-fixes-post-2.4.29.dif
+Patch9: 0009-ITS-7167-only-poll-sockets-for-write-as-needed.dif
Patch100: openldap-2.3.37.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if "%{name}" == "openldap2"
@@ -154,6 +156,8 @@
%patch5 -p1
%patch6 -p1
%patch7 -p1
+%patch8 -p1
+%patch9 -p1
cp %{SOURCE5} .
cp %{SOURCE6} .
cd ../openldap-2.3.37
++++++ 0001-build-adjustments.dif ++++++
--- /var/tmp/diff_new_pack.kH5GCu/_old 2012-03-01 07:49:52.000000000 +0100
+++ /var/tmp/diff_new_pack.kH5GCu/_new 2012-03-01 07:49:52.000000000 +0100
@@ -1,4 +1,4 @@
-From ada0d25f62670b502166ce05fce29beb9d86ce96 Mon Sep 17 00:00:00 2001
+From e5b00828fc947aea5c6498ffffd4bfc29540c159 Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp
From 27f5cf4d4ebcef32c4102bbcc900b0d72383ddb9 Mon Sep 17 00:00:00 2001 From: Howard Chu
Date: Sun, 12 Feb 2012 15:54:11 -0800 Subject: syncrepl fixes post 2.4.29
ITS#6024 patch breaks MMR loop detection diff --git a/servers/slapd/overlays/syncprov.c b/servers/slapd/overlays/syncprov.c index 8c6c296..e44c239 100644 --- a/servers/slapd/overlays/syncprov.c +++ b/servers/slapd/overlays/syncprov.c @@ -822,7 +822,7 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, int mode ) { SlapReply rs = { REP_SEARCH }; LDAPControl *ctrls[2]; - struct berval cookie = BER_BVNULL, csns[2]; + struct berval cookie, csns[2]; Entry e_uuid = {0}; Attribute a_uuid = {0}; @@ -830,19 +830,17 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, int mode ) return SLAPD_ABANDON; ctrls[1] = NULL; - if ( !BER_BVISNULL( &opc->sctxcsn )) { - csns[0] = opc->sctxcsn; - BER_BVZERO( &csns[1] ); - slap_compose_sync_cookie( op, &cookie, csns, so->s_rid, slap_serverID ? slap_serverID : -1 ); - } + csns[0] = opc->sctxcsn; + BER_BVZERO( &csns[1] ); + slap_compose_sync_cookie( op, &cookie, csns, so->s_rid, slap_serverID ? slap_serverID : -1 ); #ifdef LDAP_DEBUG if ( so->s_sid > 0 ) { Debug( LDAP_DEBUG_SYNC, "syncprov_sendresp: to=%03x, cookie=%s\n", - so->s_sid, cookie.bv_val ? cookie.bv_val : "", 0 ); + so->s_sid, cookie.bv_val, 0 ); } else { Debug( LDAP_DEBUG_SYNC, "syncprov_sendresp: cookie=%s\n", - cookie.bv_val ? cookie.bv_val : "", 0, 0 ); + cookie.bv_val, 0, 0 ); } #endif @@ -851,9 +849,7 @@ syncprov_sendresp( Operation *op, opcookie *opc, syncops *so, int mode ) a_uuid.a_nvals = &opc->suuid; rs.sr_err = syncprov_state_ctrl( op, &rs, &e_uuid, mode, ctrls, 0, 1, &cookie ); - if ( !BER_BVISNULL( &cookie )) { - op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx ); - } + op->o_tmpfree( cookie.bv_val, op->o_tmpmemctx ); rs.sr_ctrls = ctrls; rs.sr_entry = &e_uuid; diff --git a/servers/slapd/syncrepl.c b/servers/slapd/syncrepl.c index 3938288..ff13ff9 100644 --- a/servers/slapd/syncrepl.c +++ b/servers/slapd/syncrepl.c @@ -131,7 +131,7 @@ static int syncrepl_message_to_op( syncinfo_t *, Operation *, LDAPMessage * ); static int syncrepl_message_to_entry( syncinfo_t *, Operation *, LDAPMessage *, - Modifications **, Entry **, int ); + Modifications **, Entry **, int, struct berval* ); static int syncrepl_entry( syncinfo_t *, Operation*, Entry*, Modifications**,int, struct berval*, @@ -833,7 +833,7 @@ do_syncrep2( tout_p, &msg ) ) > 0 ) { int match, punlock, syncstate; - struct berval *retdata, syncUUID, cookie = BER_BVNULL; + struct berval *retdata, syncUUID[2], cookie = BER_BVNULL; char *retoid; LDAPControl **rctrls = NULL, *rctrlp = NULL; BerVarray syncUUIDs; @@ -885,7 +885,7 @@ do_syncrep2( goto done; } ber_init2( ber, &rctrlp->ldctl_value, LBER_USE_DER ); - if ( ber_scanf( ber, "{em" /*"}"*/, &syncstate, &syncUUID ) + if ( ber_scanf( ber, "{em" /*"}"*/, &syncstate, &syncUUID[0] ) == LBER_ERROR ) { bdn.bv_val[bdn.bv_len] = '\0'; Debug( LDAP_DEBUG_ANY, "do_syncrep2: %s malformed message (%s)\n", @@ -896,7 +896,7 @@ do_syncrep2( } /* FIXME: what if syncUUID is NULL or empty? * (happens with back-sql...) */ - if ( BER_BVISEMPTY( &syncUUID ) ) { + if ( BER_BVISEMPTY( &syncUUID[0] ) ) { bdn.bv_val[bdn.bv_len] = '\0'; Debug( LDAP_DEBUG_ANY, "do_syncrep2: %s " "got empty syncUUID with LDAP_SYNC_%s (%s)\n", @@ -1007,10 +1007,10 @@ do_syncrep2( break; } } else if ( ( rc = syncrepl_message_to_entry( si, op, msg, - &modlist, &entry, syncstate ) ) == LDAP_SUCCESS ) + &modlist, &entry, syncstate, syncUUID ) ) == LDAP_SUCCESS ) { if ( ( rc = syncrepl_entry( si, op, entry, &modlist, - syncstate, &syncUUID, syncCookie.ctxcsn ) ) == LDAP_SUCCESS && + syncstate, syncUUID, syncCookie.ctxcsn ) ) == LDAP_SUCCESS && syncCookie.ctxcsn ) { rc = syncrepl_updateCookie( si, op, &syncCookie ); @@ -2415,7 +2415,8 @@ syncrepl_message_to_entry( LDAPMessage *msg, Modifications **modlist, Entry **entry, - int syncstate + int syncstate, + struct berval *syncUUID ) { Entry *e = NULL; @@ -2457,6 +2458,14 @@ syncrepl_message_to_entry( return LDAP_OTHER; } + /* syncUUID[0] is normalized UUID received over the wire + * syncUUID[1] is denormalized UUID, generated here + */ + (void)slap_uuidstr_from_normalized( &syncUUID[1], &syncUUID[0], op->o_tmpmemctx ); + Debug( LDAP_DEBUG_SYNC, + "syncrepl_message_to_entry: %s DN: %s, UUID: %s\n", + si->si_ridtxt, bdn.bv_val, syncUUID[1].bv_val ); + if ( syncstate == LDAP_SYNC_PRESENT || syncstate == LDAP_SYNC_DELETE ) { /* NOTE: this could be done even before decoding the DN, * although encoding errors wouldn't be detected */ @@ -2677,7 +2686,6 @@ syncrepl_entry( Backend *be = op->o_bd; slap_callback cb = { NULL, NULL, NULL, NULL }; int syncuuid_inserted = 0; - struct berval syncUUID_strrep = BER_BVNULL; SlapReply rs_search = {REP_RESULT}; Filter f = {0}; @@ -2707,14 +2715,13 @@ syncrepl_entry( } } - (void)slap_uuidstr_from_normalized( &syncUUID_strrep, syncUUID, op->o_tmpmemctx ); if ( syncstate != LDAP_SYNC_DELETE ) { Attribute *a = attr_find( entry->e_attrs, slap_schema.si_ad_entryUUID ); if ( a == NULL ) { /* add if missing */ attr_merge_one( entry, slap_schema.si_ad_entryUUID, - &syncUUID_strrep, syncUUID ); + &syncUUID[1], syncUUID ); } else if ( !bvmatch( &a->a_nvals[0], syncUUID ) ) { /* replace only if necessary */ @@ -2723,7 +2730,7 @@ syncrepl_entry( ber_dupbv( &a->a_nvals[0], syncUUID ); } ber_memfree( a->a_vals[0].bv_val ); - ber_dupbv( &a->a_vals[0], &syncUUID_strrep ); + ber_dupbv( &a->a_vals[0], &syncUUID[1] ); } } @@ -2734,16 +2741,16 @@ syncrepl_entry( if ( syncuuid_inserted ) { Debug( LDAP_DEBUG_SYNC, "syncrepl_entry: %s inserted UUID %s\n", - si->si_ridtxt, syncUUID_strrep.bv_val, 0 ); + si->si_ridtxt, syncUUID[1].bv_val, 0 ); } op->ors_filter = &f; - op->ors_filterstr.bv_len = STRLENOF( "(entryUUID=)" ) + syncUUID_strrep.bv_len; + op->ors_filterstr.bv_len = STRLENOF( "(entryUUID=)" ) + syncUUID[1].bv_len; op->ors_filterstr.bv_val = (char *) slap_sl_malloc( op->ors_filterstr.bv_len + 1, op->o_tmpmemctx ); AC_MEMCPY( op->ors_filterstr.bv_val, "(entryUUID=", STRLENOF( "(entryUUID=" ) ); AC_MEMCPY( &op->ors_filterstr.bv_val[STRLENOF( "(entryUUID=" )], - syncUUID_strrep.bv_val, syncUUID_strrep.bv_len ); + syncUUID[1].bv_val, syncUUID[1].bv_len ); op->ors_filterstr.bv_val[op->ors_filterstr.bv_len - 1] = ')'; op->ors_filterstr.bv_val[op->ors_filterstr.bv_len] = '\0'; @@ -2820,23 +2827,6 @@ syncrepl_entry( */ op->o_csn = a->a_vals[0]; freecsn = 0; - /* There was no cookie CSN attached to this op, - * make sure it's new enough - */ - if ( !syncCSN ) { - int i, sid = slap_parse_csn_sid( &a->a_vals[0] ); - for ( i = 0; i<si->si_cookieState->cs_num; i++ ) { - if ( sid < si->si_cookieState->cs_sids[i] ) - break; - if ( sid == si->si_cookieState->cs_sids[i] ) { - if ( ber_bvcmp( &a->a_vals[0], &si->si_cookieState->cs_vals[i] ) <= 0 ) { - Debug( LDAP_DEBUG_SYNC, "do_syncrep2: %s entryCSN too old, ignoring %s (%s)\n", - si->si_ridtxt, a->a_vals[0].bv_val, entry->e_name.bv_val ); - goto done; - } - } - } - } } } retry_add:; @@ -3229,10 +3219,8 @@ retry_modrdn:; } done: - if ( !BER_BVISNULL( &syncUUID_strrep ) ) { - slap_sl_free( syncUUID_strrep.bv_val, op->o_tmpmemctx ); - BER_BVZERO( &syncUUID_strrep ); - } + slap_sl_free( syncUUID[1].bv_val, op->o_tmpmemctx ); + BER_BVZERO( &syncUUID[1] ); if ( !BER_BVISNULL( &dni.ndn ) ) { op->o_tmpfree( dni.ndn.bv_val, op->o_tmpmemctx ); } -- 1.7.7 ++++++ 0009-ITS-7167-only-poll-sockets-for-write-as-needed.dif ++++++
From 867663c9b0f3468d16ba63340340edfadd8722bb Mon Sep 17 00:00:00 2001 From: Howard Chu
Date: Mon, 20 Feb 2012 14:51:30 -0800 Subject: ITS#7167 only poll sockets for write as needed
diff --git a/libraries/libldap/ldap-int.h b/libraries/libldap/ldap-int.h index b4261a1..1ef15ad 100644 --- a/libraries/libldap/ldap-int.h +++ b/libraries/libldap/ldap-int.h @@ -624,6 +624,7 @@ LDAP_F (void) ldap_free_select_info( void *sip ); LDAP_F (void) ldap_mark_select_write( LDAP *ld, Sockbuf *sb ); LDAP_F (void) ldap_mark_select_read( LDAP *ld, Sockbuf *sb ); LDAP_F (void) ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ); +LDAP_F (void) ldap_clear_select_write( LDAP *ld, Sockbuf *sb ); LDAP_F (int) ldap_is_read_ready( LDAP *ld, Sockbuf *sb ); LDAP_F (int) ldap_is_write_ready( LDAP *ld, Sockbuf *sb ); diff --git a/libraries/libldap/open.c b/libraries/libldap/open.c index 6b92ba6..a920953 100644 --- a/libraries/libldap/open.c +++ b/libraries/libldap/open.c @@ -344,7 +344,6 @@ ldap_init_fd( /* Add the connection to the *LDAP's select pool */ ldap_mark_select_read( ld, conn->lconn_sb ); - ldap_mark_select_write( ld, conn->lconn_sb ); *ldp = ld; return LDAP_SUCCESS; @@ -502,7 +501,6 @@ ldap_open_internal_connection( LDAP **ldp, ber_socket_t *fdp ) /* Add the connection to the *LDAP's select pool */ ldap_mark_select_read( ld, c->lconn_sb ); - ldap_mark_select_write( ld, c->lconn_sb ); /* Make this connection an LDAP V3 protocol connection */ rc = LDAP_VERSION3; diff --git a/libraries/libldap/os-ip.c b/libraries/libldap/os-ip.c index daa765e..2864256 100644 --- a/libraries/libldap/os-ip.c +++ b/libraries/libldap/os-ip.c @@ -966,6 +966,32 @@ ldap_mark_select_clear( LDAP *ld, Sockbuf *sb ) #endif } +void +ldap_clear_select_write( LDAP *ld, Sockbuf *sb ) +{ + struct selectinfo *sip; + ber_socket_t sd; + + sip = (struct selectinfo *)ld->ld_selectinfo; + + ber_sockbuf_ctrl( sb, LBER_SB_OPT_GET_FD, &sd ); + +#ifdef HAVE_POLL + /* for UNIX poll(2) */ + { + int i; + for(i=0; i < sip->si_maxfd; i++) { + if( sip->si_fds[i].fd == sd ) { + sip->si_fds[i].events &= ~POLL_WRITE; + } + } + } +#else + /* for UNIX select(2) */ + FD_CLR( sd, &sip->si_writefds ); +#endif +} + int ldap_is_write_ready( LDAP *ld, Sockbuf *sb ) diff --git a/libraries/libldap/request.c b/libraries/libldap/request.c index 88190a2..071391d 100644 --- a/libraries/libldap/request.c +++ b/libraries/libldap/request.c @@ -202,6 +202,7 @@ ldap_int_flush_request( /* sent -- waiting for a response */ ldap_mark_select_read( ld, lc->lconn_sb ); + ldap_clear_select_write( ld, lc->lconn_sb ); } return 0; } diff --git a/libraries/libldap/result.c b/libraries/libldap/result.c index b6e8e75..7241df9 100644 --- a/libraries/libldap/result.c +++ b/libraries/libldap/result.c @@ -302,7 +302,7 @@ wait4msg( if ( ber_sockbuf_ctrl( lc->lconn_sb, LBER_SB_OPT_DATA_READY, NULL ) ) { - lc_ready = 1; + lc_ready = 2; /* ready at ber level, not socket level */ break; } } @@ -373,8 +373,8 @@ wait4msg( } } LDAP_MUTEX_UNLOCK( &ld->ld_req_mutex ); - /* Quit looping if no one handled any events */ - if (!serviced) + /* Quit looping if no one handled any socket events */ + if (!serviced && lc_ready == 1) rc = -1; } LDAP_MUTEX_UNLOCK( &ld->ld_conn_mutex ); -- 1.7.7 ++++++ openldap-2.4.28.tgz -> openldap-2.4.29.tgz ++++++ ++++ 14980 lines of diff (skipped) -- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org