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 3aca9487589fe9882d979aee5f9c0e87af3350e3..78e0a802d5837c4a229fa91b50f734e10786ad46 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 932695d4d5a59f66174abcac503e23a61a4589c8..50b45ae91ce818244350007e48a9922c278ea0e1 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 7c5f8cfd7bd88cfaf9f2bb845001539bcdc90bfd..951417583bc78ea4008c8aa4399a93fae6f65a47 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);