]> git.sur5r.net Git - openldap/commitdiff
import fix to ITS#5513
authorPierangelo Masarati <ando@openldap.org>
Sun, 18 May 2008 11:23:53 +0000 (11:23 +0000)
committerPierangelo Masarati <ando@openldap.org>
Sun, 18 May 2008 11:23:53 +0000 (11:23 +0000)
CHANGES
servers/slapd/back-ldap/search.c

diff --git a/CHANGES b/CHANGES
index bf4e920ba90e88b8344314ae770a7480765b41f9..23aa8001b611acd409abfa791f1501981d739873 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,7 @@
 OpenLDAP 2.4 Change Log
 
 OpenLDAP 2.4.10 Engineering
+       Fixed slapd-ldap entry_get() op-dependent behavior (ITS#5513)
 
 OpenLDAP 2.4.9 Release (2008/05/07)
        Fixed libldap to use unsigned port (ITS#5436)
index 27daed6a0ffa9a6dc0ef9cd1c44b850a95b5f8a8..3dcbcb65be6576d04b47fb96359c3375228b4fa7 100644 (file)
@@ -773,8 +773,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;
@@ -788,12 +789,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;