From ab1e121b76a953f89592df8ec471603715b57dfc Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 17 Jun 2005 02:45:40 +0000 Subject: r7665: - added a ildap_*() interface to our internal ldap library. This interface is very similar to the traditional ldap interface, and will be used as part of a ldb backend based on the current ldb_ldap backend - fixed some allocation issues in ldb_msg.c (This used to be commit b34a29dcf26f68a2f47380a6c74a4095fdfd2fbe) --- source4/libcli/ldap/ldap_ildap.c | 209 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 209 insertions(+) create mode 100644 source4/libcli/ldap/ldap_ildap.c (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c new file mode 100644 index 0000000000..cfcb79f64f --- /dev/null +++ b/source4/libcli/ldap/ldap_ildap.c @@ -0,0 +1,209 @@ +/* + Unix SMB/CIFS mplementation. + + ildap api - an api similar to the traditional ldap api + + Copyright (C) Andrew Tridgell 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +*/ + +#include "includes.h" +#include "libcli/ldap/ldap.h" +#include "libcli/ldap/ldap_client.h" + +/* + delete a record + */ +NTSTATUS ildap_delete(struct ldap_connection *conn, const char *dn) +{ + struct ldap_message *msg; + NTSTATUS status; + + msg = new_ldap_message(conn); + NT_STATUS_HAVE_NO_MEMORY(msg); + + msg->type = LDAP_TAG_DelRequest; + msg->r.DelRequest.dn = dn; + + status = ldap_transaction(conn, msg); + + talloc_free(msg); + + return status; +} + +/* + add a record + */ +NTSTATUS ildap_add(struct ldap_connection *conn, const char *dn, struct ldap_mod **mods) +{ + struct ldap_message *msg; + int n, i; + NTSTATUS status; + + msg = new_ldap_message(conn); + NT_STATUS_HAVE_NO_MEMORY(msg); + + for (n=0;mods[n];n++) /* noop */ ; + + msg->type = LDAP_TAG_AddRequest; + msg->r.AddRequest.dn = dn; + msg->r.AddRequest.num_attributes = n; + msg->r.AddRequest.attributes = talloc_array(msg, struct ldb_message_element, n); + if (msg->r.AddRequest.attributes == NULL) { + talloc_free(msg); + return NT_STATUS_NO_MEMORY; + } + for (i=0;ir.AddRequest.attributes[i] = mods[i]->attrib; + } + + status = ldap_transaction(conn, msg); + + talloc_free(msg); + + return status; +} + + +/* + modify a record + */ +NTSTATUS ildap_modify(struct ldap_connection *conn, const char *dn, struct ldap_mod **mods) +{ + struct ldap_message *msg; + int n, i; + NTSTATUS status; + + msg = new_ldap_message(conn); + NT_STATUS_HAVE_NO_MEMORY(msg); + + for (n=0;mods[n];n++) /* noop */ ; + + msg->type = LDAP_TAG_ModifyRequest; + msg->r.ModifyRequest.dn = dn; + msg->r.ModifyRequest.num_mods = n; + msg->r.ModifyRequest.mods = talloc_array(msg, struct ldap_mod, n); + if (msg->r.ModifyRequest.mods == NULL) { + talloc_free(msg); + return NT_STATUS_NO_MEMORY; + } + for (i=0;ir.ModifyRequest.mods[i] = *mods[i]; + } + + status = ldap_transaction(conn, msg); + + talloc_free(msg); + + return status; +} + + +/* + rename a record + */ +NTSTATUS ildap_rename(struct ldap_connection *conn, const char *dn, const char *newrdn, + const char *parentdn, BOOL deleteolddn) +{ + struct ldap_message *msg; + NTSTATUS status; + + msg = new_ldap_message(conn); + NT_STATUS_HAVE_NO_MEMORY(msg); + + msg->type = LDAP_TAG_ModifyDNRequest; + msg->r.ModifyDNRequest.dn = dn; + msg->r.ModifyDNRequest.newrdn = newrdn; + msg->r.ModifyDNRequest.deleteolddn = deleteolddn; + msg->r.ModifyDNRequest.newsuperior = parentdn; + + status = ldap_transaction(conn, msg); + + talloc_free(msg); + + return status; +} + + +/* + count the returned search entries +*/ +int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res) +{ + int i; + for (i=0;res && res[i];i++) /* noop */ ; + return i; +} + + +/* + perform a ldap search +*/ +NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, + int scope, const char *expression, + const char * const *attrs, BOOL attributesonly, + struct ldap_message ***results) +{ + struct ldap_message *msg; + int n, i; + NTSTATUS status; + struct ldap_request *req; + + *results = NULL; + + msg = new_ldap_message(conn); + NT_STATUS_HAVE_NO_MEMORY(msg); + + for (n=0;attrs && attrs[n];n++) /* noop */ ; + + msg->type = LDAP_TAG_SearchRequest; + msg->r.SearchRequest.basedn = basedn; + msg->r.SearchRequest.scope = scope; + msg->r.SearchRequest.deref = LDAP_DEREFERENCE_NEVER; + msg->r.SearchRequest.timelimit = 0; + msg->r.SearchRequest.sizelimit = 0; + msg->r.SearchRequest.attributesonly = attributesonly; + msg->r.SearchRequest.tree = ldb_parse_tree(msg, expression); + msg->r.SearchRequest.num_attributes = n; + msg->r.SearchRequest.attributes = attrs; + + req = ldap_request_send(conn, msg); + talloc_steal(msg, req); + + for (i=n=0;True;i++) { + struct ldap_message *res; + status = ldap_result_n(req, i, &res); + if (!NT_STATUS_IS_OK(status)) break; + if (res->type != LDAP_TAG_SearchResultEntry) continue; + + (*results) = talloc_realloc(conn, *results, struct ldap_message *, n+2); + if (*results == NULL) { + talloc_free(msg); + return NT_STATUS_NO_MEMORY; + } + (*results)[n] = talloc_steal(*results, res); + (*results)[n+1] = NULL; + n++; + } + + if (NT_STATUS_EQUAL(status, NT_STATUS_NO_MORE_ENTRIES)) { + status = NT_STATUS_OK; + } + + return status; +} -- cgit From 56b79e945f1e28d1ba7296e44a9802c140b942ef Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 18 Jun 2005 07:54:14 +0000 Subject: r7713: fixed error display in ildap_search() (This used to be commit abc9f4bd89d0eda655f7de01db49cbbb64682bf4) --- source4/libcli/ldap/ldap_ildap.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index cfcb79f64f..541797c25c 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -189,6 +189,12 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, struct ldap_message *res; status = ldap_result_n(req, i, &res); if (!NT_STATUS_IS_OK(status)) break; + + if (res->type == LDAP_TAG_SearchResultDone) { + status = ldap_check_response(conn, &res->r.GeneralResult); + break; + } + if (res->type != LDAP_TAG_SearchResultEntry) continue; (*results) = talloc_realloc(conn, *results, struct ldap_message *, n+2); -- cgit From 67762d7965d74e4534a9dcb06276786fa9a37713 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 30 Sep 2005 23:56:54 +0000 Subject: r10668: added a ildap_search_bytree() function (This used to be commit fd6d895ebdb201ac6afaf5c8ec84d003765cdff6) --- source4/libcli/ldap/ldap_ildap.c | 25 ++++++++++++++++++++----- 1 file changed, 20 insertions(+), 5 deletions(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 541797c25c..d85585bce8 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -154,10 +154,10 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res) /* perform a ldap search */ -NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, - int scope, const char *expression, - const char * const *attrs, BOOL attributesonly, - struct ldap_message ***results) +NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, + int scope, struct ldb_parse_tree *tree, + const char * const *attrs, BOOL attributesonly, + struct ldap_message ***results) { struct ldap_message *msg; int n, i; @@ -178,7 +178,7 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, msg->r.SearchRequest.timelimit = 0; msg->r.SearchRequest.sizelimit = 0; msg->r.SearchRequest.attributesonly = attributesonly; - msg->r.SearchRequest.tree = ldb_parse_tree(msg, expression); + msg->r.SearchRequest.tree = tree; msg->r.SearchRequest.num_attributes = n; msg->r.SearchRequest.attributes = attrs; @@ -213,3 +213,18 @@ NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, return status; } + +/* + perform a ldap search +*/ +NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, + int scope, const char *expression, + const char * const *attrs, BOOL attributesonly, + struct ldap_message ***results) +{ + struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression); + NTSTATUS status; + status = ildap_search(conn, basedn, scope, tree, attrs, attributesonly, results); + talloc_free(tree); + return status; +} -- cgit From ca40d0a6fea0dbf2a9962ed125f420bea3ca0269 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 24 Oct 2005 04:19:27 +0000 Subject: r11271: Fix a warning and an infinite recursion (This used to be commit 7bc855359a82010fefa9fd1d4c719292bfc83528) --- source4/libcli/ldap/ldap_ildap.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index d85585bce8..666cc02536 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -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; } -- cgit From d4de4c2d210d2e8c9b5aedf70695594809ad6a0b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 30 Dec 2005 13:16:54 +0000 Subject: r12608: Remove some unused #include lines. (This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981) --- source4/libcli/ldap/ldap_ildap.c | 1 - 1 file changed, 1 deletion(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 666cc02536..f29685a67c 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -22,7 +22,6 @@ */ #include "includes.h" -#include "libcli/ldap/ldap.h" #include "libcli/ldap/ldap_client.h" /* -- cgit From c908d0b2aa111659e57a73efb8c33c413965c846 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Fri, 6 Jan 2006 04:01:23 +0000 Subject: r12733: Merge ldap/ldb controls into main tree There's still lot of work to do but the patch is stable enough to be pushed into the main samba4 tree. Simo. (This used to be commit 77125feaff252cab44d26593093a9c211c846ce8) --- source4/libcli/ldap/ldap_ildap.c | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index f29685a67c..a5227ec37f 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -22,6 +22,7 @@ */ #include "includes.h" +#include "libcli/ldap/ldap.h" #include "libcli/ldap/ldap_client.h" /* @@ -156,6 +157,8 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res) NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, int scope, struct ldb_parse_tree *tree, const char * const *attrs, BOOL attributesonly, + struct ldap_Control **control_req, + struct ldap_Control ***control_res, struct ldap_message ***results) { struct ldap_message *msg; @@ -163,6 +166,8 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, NTSTATUS status; struct ldap_request *req; + if (control_res) + *control_res = NULL; *results = NULL; msg = new_ldap_message(conn); @@ -180,6 +185,7 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, msg->r.SearchRequest.tree = tree; msg->r.SearchRequest.num_attributes = n; msg->r.SearchRequest.attributes = discard_const(attrs); + msg->controls = control_req; req = ldap_request_send(conn, msg); talloc_steal(msg, req); @@ -191,6 +197,9 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, if (res->type == LDAP_TAG_SearchResultDone) { status = ldap_check_response(conn, &res->r.GeneralResult); + if (control_res) { + *control_res = talloc_steal(conn, res->controls); + } break; } @@ -219,12 +228,15 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, int scope, const char *expression, const char * const *attrs, BOOL attributesonly, + struct ldap_Control **control_req, + struct ldap_Control ***control_res, struct ldap_message ***results) { struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression); NTSTATUS status; status = ildap_search_bytree(conn, basedn, scope, tree, attrs, - attributesonly, results); + attributesonly, control_req, + control_res, results); talloc_free(tree); return status; } -- cgit From 00fe70e5b917769418f68eaa255d3a06a9a08ce7 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Wed, 22 Feb 2006 01:31:35 +0000 Subject: r13609: Get in the initial work on making ldb async Currently only ldb_ildap is async, the plan is to first make all backend support the async calls, and then remove the sync functions from backends and keep the only in the API. Modules will need to be transformed along the way. Simo (This used to be commit 1e2c13b2d52de7c534493dd79a2c0596a3e8c1f5) --- source4/libcli/ldap/ldap_ildap.c | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index a5227ec37f..f26fb7db78 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -152,13 +152,13 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res) /* - perform a ldap search + perform a synchronous ldap search */ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, int scope, struct ldb_parse_tree *tree, const char * const *attrs, BOOL attributesonly, - struct ldap_Control **control_req, - struct ldap_Control ***control_res, + struct ldb_control **control_req, + struct ldb_control ***control_res, struct ldap_message ***results) { struct ldap_message *msg; @@ -203,7 +203,9 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, break; } - if (res->type != LDAP_TAG_SearchResultEntry) continue; + if (res->type != LDAP_TAG_SearchResultEntry && + res->type != LDAP_TAG_SearchResultReference) + continue; (*results) = talloc_realloc(conn, *results, struct ldap_message *, n+2); if (*results == NULL) { @@ -228,8 +230,8 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, NTSTATUS ildap_search(struct ldap_connection *conn, const char *basedn, int scope, const char *expression, const char * const *attrs, BOOL attributesonly, - struct ldap_Control **control_req, - struct ldap_Control ***control_res, + struct ldb_control **control_req, + struct ldb_control ***control_res, struct ldap_message ***results) { struct ldb_parse_tree *tree = ldb_parse_tree(conn, expression); -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libcli/ldap/ldap_ildap.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index f26fb7db78..5366e325cb 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ -- cgit From a87dea2a0894015cf4a3140995791f5468c40038 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 10 Jul 2007 11:37:30 +0000 Subject: r23810: Make things static, and remove unsued code. This includes some of the original ildap ldap client API. ldb provides a much easier abstraction on this to use, and doesn't use these functions. Andrew Bartlett (This used to be commit dc27a7e41c297472675e8c251bb14327a1af3902) --- source4/libcli/ldap/ldap_ildap.c | 114 --------------------------------------- 1 file changed, 114 deletions(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 5366e325cb..62019b8cc1 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -24,120 +24,6 @@ #include "libcli/ldap/ldap.h" #include "libcli/ldap/ldap_client.h" -/* - delete a record - */ -NTSTATUS ildap_delete(struct ldap_connection *conn, const char *dn) -{ - struct ldap_message *msg; - NTSTATUS status; - - msg = new_ldap_message(conn); - NT_STATUS_HAVE_NO_MEMORY(msg); - - msg->type = LDAP_TAG_DelRequest; - msg->r.DelRequest.dn = dn; - - status = ldap_transaction(conn, msg); - - talloc_free(msg); - - return status; -} - -/* - add a record - */ -NTSTATUS ildap_add(struct ldap_connection *conn, const char *dn, struct ldap_mod **mods) -{ - struct ldap_message *msg; - int n, i; - NTSTATUS status; - - msg = new_ldap_message(conn); - NT_STATUS_HAVE_NO_MEMORY(msg); - - for (n=0;mods[n];n++) /* noop */ ; - - msg->type = LDAP_TAG_AddRequest; - msg->r.AddRequest.dn = dn; - msg->r.AddRequest.num_attributes = n; - msg->r.AddRequest.attributes = talloc_array(msg, struct ldb_message_element, n); - if (msg->r.AddRequest.attributes == NULL) { - talloc_free(msg); - return NT_STATUS_NO_MEMORY; - } - for (i=0;ir.AddRequest.attributes[i] = mods[i]->attrib; - } - - status = ldap_transaction(conn, msg); - - talloc_free(msg); - - return status; -} - - -/* - modify a record - */ -NTSTATUS ildap_modify(struct ldap_connection *conn, const char *dn, struct ldap_mod **mods) -{ - struct ldap_message *msg; - int n, i; - NTSTATUS status; - - msg = new_ldap_message(conn); - NT_STATUS_HAVE_NO_MEMORY(msg); - - for (n=0;mods[n];n++) /* noop */ ; - - msg->type = LDAP_TAG_ModifyRequest; - msg->r.ModifyRequest.dn = dn; - msg->r.ModifyRequest.num_mods = n; - msg->r.ModifyRequest.mods = talloc_array(msg, struct ldap_mod, n); - if (msg->r.ModifyRequest.mods == NULL) { - talloc_free(msg); - return NT_STATUS_NO_MEMORY; - } - for (i=0;ir.ModifyRequest.mods[i] = *mods[i]; - } - - status = ldap_transaction(conn, msg); - - talloc_free(msg); - - return status; -} - - -/* - rename a record - */ -NTSTATUS ildap_rename(struct ldap_connection *conn, const char *dn, const char *newrdn, - const char *parentdn, BOOL deleteolddn) -{ - struct ldap_message *msg; - NTSTATUS status; - - msg = new_ldap_message(conn); - NT_STATUS_HAVE_NO_MEMORY(msg); - - msg->type = LDAP_TAG_ModifyDNRequest; - msg->r.ModifyDNRequest.dn = dn; - msg->r.ModifyDNRequest.newrdn = newrdn; - msg->r.ModifyDNRequest.deleteolddn = deleteolddn; - msg->r.ModifyDNRequest.newsuperior = parentdn; - - status = ldap_transaction(conn, msg); - - talloc_free(msg); - - return status; -} - /* count the returned search entries -- cgit From 2151cde58014ea2e822c13d2f8a369b45dc19ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:28:14 +0000 Subject: r25554: Convert last instances of BOOL, True and False to the standard types. (This used to be commit 566aa14139510788548a874e9213d91317f83ca9) --- source4/libcli/ldap/ldap_ildap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 62019b8cc1..7b592c65ae 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -41,7 +41,7 @@ int ildap_count_entries(struct ldap_connection *conn, struct ldap_message **res) */ 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) @@ -75,7 +75,7 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, 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; @@ -114,7 +114,7 @@ NTSTATUS ildap_search_bytree(struct ldap_connection *conn, const char *basedn, */ 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) -- cgit From afe3e8172ddaa5e4aa811faceecda4f943d6e2ef Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Wed, 2 Apr 2008 04:53:27 +0200 Subject: Install public header files again and include required prototypes. (This used to be commit 47ffbbf67435904754469544390b67d34c958343) --- source4/libcli/ldap/ldap_ildap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source4/libcli/ldap/ldap_ildap.c') diff --git a/source4/libcli/ldap/ldap_ildap.c b/source4/libcli/ldap/ldap_ildap.c index 7b592c65ae..8f21af0690 100644 --- a/source4/libcli/ldap/ldap_ildap.c +++ b/source4/libcli/ldap/ldap_ildap.c @@ -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,7 +39,7 @@ 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, struct ldb_control **control_req, @@ -112,7 +112,7 @@ 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, struct ldb_control **control_req, -- cgit