mirror of
https://git.openldap.org/openldap/openldap.git
synced 2025-12-23 08:09:34 -05:00
lookup entries as LDAP_REQ_SEARCH (ITS#5513)
This commit is contained in:
parent
08e2ce2d1d
commit
20e8da9ba7
1 changed files with 11 additions and 4 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue