r11271: Fix a warning and an infinite recursion
authorVolker Lendecke <vlendec@samba.org>
Mon, 24 Oct 2005 04:19:27 +0000 (04:19 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:45:11 +0000 (13:45 -0500)
source/libcli/ldap/ldap_ildap.c

index d85585bce8ac45de1e8ef495583bc44a6faa78ac..666cc025366c9852ddb1cbf34486e7e342b67533 100644 (file)
@@ -180,7 +180,7 @@ 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 = attrs;
+       msg->r.SearchRequest.attributes = discard_const(attrs);
 
        req = ldap_request_send(conn, msg);
        talloc_steal(msg, req);
@@ -224,7 +224,8 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn,
 {
        struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression);
        NTSTATUS status;
-       status = ildap_search(conn, basedn, scope, tree, attrs, attributesonly, results);
+       status = ildap_search_bytree(conn, basedn, scope, tree, attrs,
+                                    attributesonly, results);
        talloc_free(tree);
        return status;
 }