From 3bc1ff4e8062dba867e1956b72218da7b543b197 Mon Sep 17 00:00:00 2001 From: Pierangelo Masarati Date: Sun, 18 May 2008 11:25:45 +0000 Subject: [PATCH] import fix to ITS#5513 --- CHANGES | 3 +++ servers/slapd/back-ldap/search.c | 15 +++++++++++---- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/CHANGES b/CHANGES index dfd58caa15..c921cecd6e 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ OpenLDAP 2.3 Change Log +OpenLDAP 2.3.43 Engineering + Fixed slapd-ldap entry_get() op-dependent behavior (ITS#5513) + OpenLDAP 2.3.42 Release (2008/05/15) Fixed slapd abstract objectClass inheritance check (ITS#5474) Fixed slapd connection handling (ITS#5469) diff --git a/servers/slapd/back-ldap/search.c b/servers/slapd/back-ldap/search.c index b31bc484d2..23519a3ebc 100644 --- a/servers/slapd/back-ldap/search.c +++ b/servers/slapd/back-ldap/search.c @@ -795,8 +795,9 @@ ldap_back_entry_get( ldapinfo_t *li = (ldapinfo_t *) op->o_bd->be_private; ldapconn_t *lc = NULL; - int rc = 1, + int rc, do_not_cache; + ber_tag_t tag; struct berval bdn; LDAPMessage *result = NULL, *e = NULL; @@ -810,12 +811,18 @@ ldap_back_entry_get( /* Tell getconn this is a privileged op */ do_not_cache = op->o_do_not_cache; + tag = op->o_tag; + /* do not cache */ op->o_do_not_cache = 1; - if ( !ldap_back_dobind( &lc, op, &rs, LDAP_BACK_DONTSEND ) ) { - op->o_do_not_cache = do_not_cache; + /* ldap_back_entry_get() is an entry lookup, so it does not need + * to know what the entry is being looked up for */ + op->o_tag = LDAP_REQ_SEARCH; + rc = ldap_back_dobind( &lc, op, &rs, LDAP_BACK_DONTSEND ); + op->o_do_not_cache = do_not_cache; + op->o_tag = tag; + if ( !rc ) { return rs.sr_err; } - op->o_do_not_cache = do_not_cache; if ( at ) { attrp = attr; -- 2.47.2