smbldap: Introduce "smbldap_get_paged_results"
authorVolker Lendecke <vl@samba.org>
Wed, 19 Apr 2017 11:39:25 +0000 (13:39 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 20 Apr 2017 08:13:25 +0000 (10:13 +0200)
This should be hidden inside smbldap.c, but this is a quick way to
get smbldap_state private to smbldap.c

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Alexander Bokovoy <ab@samba.org>
Reviewed-by: Ralph Böhme <slow@samba.org>
source3/include/smbldap.h
source3/lib/smbldap.c
source3/passdb/pdb_ldap.c

index 3aca948..78e0a80 100644 (file)
@@ -70,6 +70,8 @@ NTSTATUS smbldap_init(TALLOC_CTX *mem_ctx,
 
 LDAP *smbldap_get_ldap(struct smbldap_state *state);
 bool smbldap_get_paged_results(struct smbldap_state *state);
+void smbldap_set_paged_results(struct smbldap_state *state,
+                              bool paged_results);
 
 void smbldap_set_mod (LDAPMod *** modlist, int modop, const char *attribute, const char *value);
 void smbldap_set_mod_blob(LDAPMod *** modlist, int modop, const char *attribute, const DATA_BLOB *newblob);
index 932695d..50b45ae 100644 (file)
@@ -45,6 +45,12 @@ bool smbldap_get_paged_results(struct smbldap_state *state)
        return state->paged_results;
 }
 
+void smbldap_set_paged_results(struct smbldap_state *state,
+                              bool paged_results)
+{
+       state->paged_results = paged_results;
+}
+
 /*******************************************************************
  Search an attribute and return the first value found.
 ******************************************************************/
index 7c5f8cf..9514175 100644 (file)
@@ -4424,7 +4424,7 @@ static bool ldapsam_search_firstpage(struct pdb_search *search)
 
                /* Ok, the server was lying. It told us it could do paged
                 * searches when it could not. */
-               state->connection->paged_results = False;
+               smbldap_set_paged_results(state->connection, false);
        }
 
         ld = smbldap_get_ldap(state->connection);