s4:libcli/ldap: use const char * const *attributes as in all other places
[sfrench/samba-autobuild/.git] / source4 / libcli / ldap / ldap_ildap.c
index 62019b8cc1e0c804223210cd406b0aa18f861624..f059e3882adc83d5eae2a8c66e34d9018886a81d 100644 (file)
@@ -28,7 +28,7 @@
 /*
   count the returned search entries
 */
-int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res)
+_PUBLIC_ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res)
 {
        int i;
        for (i=0;res && res[i];i++) /* noop */ ;
@@ -39,9 +39,9 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res)
 /*
   perform a synchronous ldap search
 */
-NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, 
+_PUBLIC_ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, 
                             int scope, struct ldb_parse_tree *tree,
-                            const char * const *attrs, BOOL attributesonly, 
+                            const char * const *attrs, bool attributesonly, 
                             struct ldb_control **control_req,
                             struct ldb_control ***control_res,
                             struct ldap_message ***results)
@@ -69,13 +69,13 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
        msg->r.SearchRequest.attributesonly = attributesonly;
        msg->r.SearchRequest.tree = tree;
        msg->r.SearchRequest.num_attributes = n;
-       msg->r.SearchRequest.attributes = discard_const(attrs);
+       msg->r.SearchRequest.attributes = attrs;
        msg->controls = control_req;
 
        req = ldap_request_send(conn, msg);
        talloc_steal(msg, req);
        
-       for (i=n=0;True;i++) {
+       for (i=n=0;true;i++) {
                struct ldap_message *res;
                status = ldap_result_n(req, i, &res);
                if (!NT_STATUS_IS_OK(status)) break;
@@ -112,9 +112,9 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn,
 /*
   perform a ldap search
 */
-NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, 
+_PUBLIC_ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, 
                      int scope, const char *expression, 
-                     const char * const *attrs, BOOL attributesonly, 
+                     const char * const *attrs, bool attributesonly, 
                      struct ldb_control **control_req,
                      struct ldb_control ***control_res,
                      struct ldap_message ***results)