Accepting request 107321 from network:ldap

update to 2.4.29 (forwarded request 107196 from rhafer)

OBS-URL: https://build.opensuse.org/request/show/107321
OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/openldap2?expand=0&rev=86
This commit is contained in:
Stephan Kulow 2012-03-01 06:49:38 +00:00 committed by Git OBS Bridge
commit 0c557564cd
15 changed files with 428 additions and 27 deletions

View File

@ -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 <rhafer@suse.de> From: Ralf Haferkamp <rhafer@suse.de>
Date: Wed, 16 Jun 2010 14:04:07 +0200 Date: Wed, 16 Jun 2010 14:04:07 +0200
Subject: build-adjustments Subject: build-adjustments
@ -7,7 +7,7 @@ Subject: build-adjustments
- don't use automake macro - don't use automake macro
diff --git a/build/top.mk b/build/top.mk diff --git a/build/top.mk b/build/top.mk
index 66ac3bf..f09e0c3 100644 index 14e291e..633c9a4 100644
--- a/build/top.mk --- a/build/top.mk
+++ b/build/top.mk +++ b/build/top.mk
@@ -40,7 +40,7 @@ libdir = @libdir@ @@ -40,7 +40,7 @@ libdir = @libdir@
@ -20,7 +20,7 @@ index 66ac3bf..f09e0c3 100644
sharedstatedir = @sharedstatedir@ sharedstatedir = @sharedstatedir@
sysconfdir = @sysconfdir@$(ldap_subdir) sysconfdir = @sysconfdir@$(ldap_subdir)
diff --git a/configure.in b/configure.in diff --git a/configure.in b/configure.in
index e7e5a7e..ef9d4f5 100644 index 5d7d475..f12463e 100644
--- a/configure.in --- a/configure.in
+++ b/configure.in +++ b/configure.in
@@ -69,7 +69,9 @@ dnl Determine host platform @@ -69,7 +69,9 @@ dnl Determine host platform

View File

@ -1,4 +1,4 @@
From dc422b3d677b7bb9c0699d40623def4dc93d54f0 Mon Sep 17 00:00:00 2001 From e5dae6859ae9179c636531c94d1f86ba8821d4cc Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp <rhafer@suse.de> From: Ralf Haferkamp <rhafer@suse.de>
Date: Wed, 16 Jun 2010 14:05:49 +0200 Date: Wed, 16 Jun 2010 14:05:49 +0200
Subject: slapd.conf Subject: slapd.conf

View File

@ -1,11 +1,11 @@
From daab8464b7e9269012c22566ff8406122cc1f19b Mon Sep 17 00:00:00 2001 From 530f1d6f5af77523f041657021d49b177863861d Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp <rhafer@suse.de> From: Ralf Haferkamp <rhafer@suse.de>
Date: Wed, 16 Jun 2010 14:06:42 +0200 Date: Wed, 16 Jun 2010 14:06:42 +0200
Subject: LDAPI socket location Subject: LDAPI socket location
diff --git a/include/ldap_defaults.h b/include/ldap_defaults.h diff --git a/include/ldap_defaults.h b/include/ldap_defaults.h
index 426d7f6..9a21f98 100644 index 9dba666..b9780bc 100644
--- a/include/ldap_defaults.h --- a/include/ldap_defaults.h
+++ b/include/ldap_defaults.h +++ b/include/ldap_defaults.h
@@ -39,7 +39,7 @@ @@ -39,7 +39,7 @@

View File

@ -1,11 +1,11 @@
From ae570a81db3e070d0c449fe9eb70352c8ffcf22a Mon Sep 17 00:00:00 2001 From 3f733c7f1da53e613cf6d20f3886a679614a2d26 Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp <rhafer@suse.de> From: Ralf Haferkamp <rhafer@suse.de>
Date: Wed, 16 Jun 2010 14:08:03 +0200 Date: Wed, 16 Jun 2010 14:08:03 +0200
Subject: libldap use gethostbyname_r Subject: libldap use gethostbyname_r
diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c diff --git a/libraries/libldap/util-int.c b/libraries/libldap/util-int.c
index f0b5f72..ea5e178 100644 index 85f13fc..60f640a 100644
--- a/libraries/libldap/util-int.c --- a/libraries/libldap/util-int.c
+++ b/libraries/libldap/util-int.c +++ b/libraries/libldap/util-int.c
@@ -52,7 +52,7 @@ extern int h_errno; @@ -52,7 +52,7 @@ extern int h_errno;

View File

@ -1,11 +1,11 @@
From ef2b8372346fd32c21a8b19864c2f29aed5e3e63 Mon Sep 17 00:00:00 2001 From a40157559d5dc1658787d1cbbf5fa33a30d98880 Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp <rhafer@suse.de> From: Ralf Haferkamp <rhafer@suse.de>
Date: Fri, 12 Nov 2010 09:39:11 +0100 Date: Fri, 12 Nov 2010 09:39:11 +0100
Subject: pie compile Subject: pie compile
diff --git a/build/top.mk b/build/top.mk diff --git a/build/top.mk b/build/top.mk
index f09e0c3..3cb54c7 100644 index 633c9a4..c67289d 100644
--- a/build/top.mk --- a/build/top.mk
+++ b/build/top.mk +++ b/build/top.mk
@@ -107,7 +107,7 @@ LINK_LIBS = $(MOD_LIBS) $(@PLAT@_LINK_LIBS) @@ -107,7 +107,7 @@ LINK_LIBS = $(MOD_LIBS) $(@PLAT@_LINK_LIBS)
@ -36,7 +36,7 @@ index f09e0c3..3cb54c7 100644
LIBS = $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS) LIBS = $(XLIBS) $(XXLIBS) $(AC_LIBS) $(XXXLIBS)
diff --git a/servers/slapd/back-bdb/Makefile.in b/servers/slapd/back-bdb/Makefile.in diff --git a/servers/slapd/back-bdb/Makefile.in b/servers/slapd/back-bdb/Makefile.in
index 93dc9a6..7172e70 100644 index da7da0c..dcb6d92 100644
--- a/servers/slapd/back-bdb/Makefile.in --- a/servers/slapd/back-bdb/Makefile.in
+++ b/servers/slapd/back-bdb/Makefile.in +++ b/servers/slapd/back-bdb/Makefile.in
@@ -33,6 +33,8 @@ LDAP_LIBDIR= ../../../libraries @@ -33,6 +33,8 @@ LDAP_LIBDIR= ../../../libraries
@ -49,7 +49,7 @@ index 93dc9a6..7172e70 100644
MOD_DEFS = $(@BUILD_BDB@_DEFS) MOD_DEFS = $(@BUILD_BDB@_DEFS)
MOD_LIBS = $(BDB_LIBS) MOD_LIBS = $(BDB_LIBS)
diff --git a/servers/slapd/back-hdb/Makefile.in b/servers/slapd/back-hdb/Makefile.in diff --git a/servers/slapd/back-hdb/Makefile.in b/servers/slapd/back-hdb/Makefile.in
index 8f6236b..1d5ba5f 100644 index 5af828f..6f43f7b 100644
--- a/servers/slapd/back-hdb/Makefile.in --- a/servers/slapd/back-hdb/Makefile.in
+++ b/servers/slapd/back-hdb/Makefile.in +++ b/servers/slapd/back-hdb/Makefile.in
@@ -37,6 +37,8 @@ LDAP_LIBDIR= ../../../libraries @@ -37,6 +37,8 @@ LDAP_LIBDIR= ../../../libraries
@ -62,7 +62,7 @@ index 8f6236b..1d5ba5f 100644
MOD_DEFS = $(@BUILD_HDB@_DEFS) MOD_DEFS = $(@BUILD_HDB@_DEFS)
MOD_LIBS = $(BDB_LIBS) MOD_LIBS = $(BDB_LIBS)
diff --git a/servers/slapd/back-ldap/Makefile.in b/servers/slapd/back-ldap/Makefile.in diff --git a/servers/slapd/back-ldap/Makefile.in b/servers/slapd/back-ldap/Makefile.in
index 418447f..8d42e72 100644 index 392d92e..3a0663d 100644
--- a/servers/slapd/back-ldap/Makefile.in --- a/servers/slapd/back-ldap/Makefile.in
+++ b/servers/slapd/back-ldap/Makefile.in +++ b/servers/slapd/back-ldap/Makefile.in
@@ -26,6 +26,8 @@ LDAP_LIBDIR= ../../../libraries @@ -26,6 +26,8 @@ LDAP_LIBDIR= ../../../libraries
@ -75,7 +75,7 @@ index 418447f..8d42e72 100644
MOD_DEFS = $(@BUILD_LDAP@_DEFS) MOD_DEFS = $(@BUILD_LDAP@_DEFS)
diff --git a/servers/slapd/back-ldif/Makefile.in b/servers/slapd/back-ldif/Makefile.in diff --git a/servers/slapd/back-ldif/Makefile.in b/servers/slapd/back-ldif/Makefile.in
index a8b5a96..12fbaab 100644 index 5e4abc1..1e8c454 100644
--- a/servers/slapd/back-ldif/Makefile.in --- a/servers/slapd/back-ldif/Makefile.in
+++ b/servers/slapd/back-ldif/Makefile.in +++ b/servers/slapd/back-ldif/Makefile.in
@@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries @@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries
@ -88,7 +88,7 @@ index a8b5a96..12fbaab 100644
MOD_DEFS = $(yes_DEFS) MOD_DEFS = $(yes_DEFS)
diff --git a/servers/slapd/back-monitor/Makefile.in b/servers/slapd/back-monitor/Makefile.in diff --git a/servers/slapd/back-monitor/Makefile.in b/servers/slapd/back-monitor/Makefile.in
index ddb474a..61e51b8 100644 index 9aecdbc..11c962c 100644
--- a/servers/slapd/back-monitor/Makefile.in --- a/servers/slapd/back-monitor/Makefile.in
+++ b/servers/slapd/back-monitor/Makefile.in +++ b/servers/slapd/back-monitor/Makefile.in
@@ -30,6 +30,8 @@ LDAP_LIBDIR= ../../../libraries @@ -30,6 +30,8 @@ LDAP_LIBDIR= ../../../libraries
@ -101,7 +101,7 @@ index ddb474a..61e51b8 100644
MOD_DEFS = $(@BUILD_MONITOR@_DEFS) MOD_DEFS = $(@BUILD_MONITOR@_DEFS)
diff --git a/servers/slapd/back-relay/Makefile.in b/servers/slapd/back-relay/Makefile.in diff --git a/servers/slapd/back-relay/Makefile.in b/servers/slapd/back-relay/Makefile.in
index f93a84c..a35dd83 100644 index 90ea4b3..ff2f429 100644
--- a/servers/slapd/back-relay/Makefile.in --- a/servers/slapd/back-relay/Makefile.in
+++ b/servers/slapd/back-relay/Makefile.in +++ b/servers/slapd/back-relay/Makefile.in
@@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries @@ -22,6 +22,8 @@ LDAP_LIBDIR= ../../../libraries

View File

@ -1,4 +1,4 @@
From b0508b1d0322491955d6ed11fc8c980f6a07dd18 Mon Sep 17 00:00:00 2001 From a994bf2d5f145d52ce7351468b4b897a4f65d3a4 Mon Sep 17 00:00:00 2001
From: Cristian Rodriguez <cristian.rodriguez@opensuse.org> From: Cristian Rodriguez <cristian.rodriguez@opensuse.org>
Date: Tue, 5 Oct 2010 13:59:40 +0200 Date: Tue, 5 Oct 2010 13:59:40 +0200
Subject: No Build date and time in binaries Subject: No Build date and time in binaries
@ -7,7 +7,7 @@ This avoids build-compare failures and unhelpful rebuilds/republishes in
the openSUSE buildservice. the openSUSE buildservice.
diff --git a/build/mkversion b/build/mkversion diff --git a/build/mkversion b/build/mkversion
index 5c020b8..0160ab1 100755 index 3fd9565..dd9a998 100755
--- a/build/mkversion --- a/build/mkversion
+++ b/build/mkversion +++ b/build/mkversion
@@ -50,7 +50,7 @@ if test $# != 1 ; then @@ -50,7 +50,7 @@ if test $# != 1 ; then

View File

@ -1,4 +1,4 @@
From e17f4d8c705ffa9080fd2ca5cf6780e30d04b0ac Mon Sep 17 00:00:00 2001 From ab9cfed7b0f7b77b9715ec01a267b523a12c63d0 Mon Sep 17 00:00:00 2001
From: Ralf Haferkamp <rhafer@suse.de> From: Ralf Haferkamp <rhafer@suse.de>
Date: Tue, 5 Oct 2010 14:20:22 +0200 Date: Tue, 5 Oct 2010 14:20:22 +0200
Subject: Recover on DB version change Subject: Recover on DB version change
@ -7,7 +7,7 @@ If the libdb Version changed try to recover the database. Note: This will
only succeed if only the format of transaction logs changed. only succeed if only the format of transaction logs changed.
diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c diff --git a/servers/slapd/back-bdb/init.c b/servers/slapd/back-bdb/init.c
index 526fee8..a9f7c5a 100644 index ac5a6d5..fea5cb4 100644
--- a/servers/slapd/back-bdb/init.c --- a/servers/slapd/back-bdb/init.c
+++ b/servers/slapd/back-bdb/init.c +++ b/servers/slapd/back-bdb/init.c
@@ -330,6 +330,13 @@ shm_retry: @@ -330,6 +330,13 @@ shm_retry:

View File

@ -0,0 +1,227 @@
From 27f5cf4d4ebcef32c4102bbcc900b0d72383ddb9 Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
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

View File

@ -0,0 +1,114 @@
From 867663c9b0f3468d16ba63340340edfadd8722bb Mon Sep 17 00:00:00 2001
From: Howard Chu <hyc@openldap.org>
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

View File

@ -1,3 +0,0 @@
version https://git-lfs.github.com/spec/v1
oid sha256:332ab5b13dbc0f85b1112d7a6f3485069108bfbd4d2603c8b548adbfa9bbc371
size 5436340

3
openldap-2.4.29.tgz Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:44e95acab6c94b53723a451bd272c10f4f596f42bf26593ab84bb399d053c1e1
size 5439978

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
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)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 7 11:10:19 UTC 2011 - cfarrell@suse.com Wed Dec 7 11:10:19 UTC 2011 - cfarrell@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package openldap2-client # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -24,7 +24,7 @@ BuildRequires: cyrus-sasl-devel libopenssl-devel libtool
%if %sles_version == 9 || %sles_version == 10 %if %sles_version == 9 || %sles_version == 10
BuildRequires: -libopenssl-devel -pwdutils openssl-devel BuildRequires: -libopenssl-devel -pwdutils openssl-devel
%endif %endif
Version: 2.4.28 Version: 2.4.29
Release: 1 Release: 1
Url: http://www.openldap.org Url: http://www.openldap.org
License: OLDAP-2.8 License: OLDAP-2.8
@ -60,6 +60,8 @@ Patch4: 0004-libldap-use-gethostbyname_r.dif
Patch5: 0005-pie-compile.dif Patch5: 0005-pie-compile.dif
Patch6: 0006-No-Build-date-and-time-in-binaries.dif Patch6: 0006-No-Build-date-and-time-in-binaries.dif
Patch7: 0007-Recover-on-DB-version-change.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 Patch100: openldap-2.3.37.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if "%{name}" == "openldap2" %if "%{name}" == "openldap2"
@ -161,6 +163,8 @@ This package contains the OpenLDAP client libraries.
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1
%patch9 -p1
cp %{SOURCE5} . cp %{SOURCE5} .
cp %{SOURCE6} . cp %{SOURCE6} .
cd ../openldap-2.3.37 cd ../openldap-2.3.37

View File

@ -1,3 +1,29 @@
-------------------------------------------------------------------
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)
------------------------------------------------------------------- -------------------------------------------------------------------
Wed Dec 7 11:10:19 UTC 2011 - cfarrell@suse.com Wed Dec 7 11:10:19 UTC 2011 - cfarrell@suse.com

View File

@ -1,7 +1,7 @@
# #
# spec file for package openldap2 # 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 # All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed # remain the property of their copyright owners, unless otherwise agreed
@ -24,7 +24,7 @@ BuildRequires: cyrus-sasl-devel libopenssl-devel libtool
%if %sles_version == 9 || %sles_version == 10 %if %sles_version == 9 || %sles_version == 10
BuildRequires: -libopenssl-devel -pwdutils openssl-devel BuildRequires: -libopenssl-devel -pwdutils openssl-devel
%endif %endif
Version: 2.4.28 Version: 2.4.29
Release: 1 Release: 1
Url: http://www.openldap.org Url: http://www.openldap.org
License: OLDAP-2.8 License: OLDAP-2.8
@ -60,6 +60,8 @@ Patch4: 0004-libldap-use-gethostbyname_r.dif
Patch5: 0005-pie-compile.dif Patch5: 0005-pie-compile.dif
Patch6: 0006-No-Build-date-and-time-in-binaries.dif Patch6: 0006-No-Build-date-and-time-in-binaries.dif
Patch7: 0007-Recover-on-DB-version-change.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 Patch100: openldap-2.3.37.dif
BuildRoot: %{_tmppath}/%{name}-%{version}-build BuildRoot: %{_tmppath}/%{name}-%{version}-build
%if "%{name}" == "openldap2" %if "%{name}" == "openldap2"
@ -154,6 +156,8 @@ This package contains the OpenLDAP client libraries.
%patch5 -p1 %patch5 -p1
%patch6 -p1 %patch6 -p1
%patch7 -p1 %patch7 -p1
%patch8 -p1
%patch9 -p1
cp %{SOURCE5} . cp %{SOURCE5} .
cp %{SOURCE6} . cp %{SOURCE6} .
cd ../openldap-2.3.37 cd ../openldap-2.3.37