directory-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From seman...@apache.org
Subject [directory-ldap-api] branch master updated: Fixed root DSE access (abandon requests after wrong handling of search cursor)
Date Mon, 14 Jun 2021 13:58:38 GMT
This is an automated email from the ASF dual-hosted git repository.

semancik pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/directory-ldap-api.git


The following commit(s) were added to refs/heads/master by this push:
     new 06d26e8  Fixed root DSE access (abandon requests after wrong handling of search cursor)
06d26e8 is described below

commit 06d26e840ee316b5f510ab48019c6390ec972747
Author: Radovan Semancik <radovan.semancik@evolveum.com>
AuthorDate: Mon Jun 14 15:56:18 2021 +0200

    Fixed root DSE access (abandon requests after wrong handling of search cursor)
---
 .../org/apache/directory/ldap/client/api/LdapNetworkConnection.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
index 0d425a3..26c4db2 100644
--- a/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
+++ b/ldap/client/api/src/main/java/org/apache/directory/ldap/client/api/LdapNetworkConnection.java
@@ -4301,7 +4301,7 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements
Lda
     @Override
     public Entry getRootDse() throws LdapException
     {
-        return lookup( Dn.ROOT_DSE, SchemaConstants.ALL_USER_ATTRIBUTES_ARRAY );
+        return lookup( Dn.ROOT_DSE, SchemaConstants.ALL_ATTRIBUTES_ARRAY );
     }
 
 
@@ -4639,6 +4639,10 @@ public class LdapNetworkConnection extends AbstractLdapConnection implements
Lda
             if ( cursor.next() )
             {
                 rootDse = cursor.get();
+                // We have to call cursor.next() here, as we need to make sure that the "done"
status of the cursor
+                // is properly updated. Otherwise the subsequent cursor.close() initiates
an ABANDON operation to
+                // stop the search, which is in fact finished already.
+                cursor.next();
             }
             else
             {

Mime
View raw message