r5305: removed libcli/ldap/ldap.h from includes.h
authorAndrew Tridgell <tridge@samba.org>
Thu, 10 Feb 2005 07:08:40 +0000 (07:08 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:09:39 +0000 (13:09 -0500)
(This used to be commit 0df3fdd8178085c40f9cd776cc3e1486ca559c8e)

12 files changed:
source4/include/includes.h
source4/include/structs.h
source4/ldap_server/ldap_backend.c
source4/ldap_server/ldap_bind.c
source4/ldap_server/ldap_server.h
source4/libcli/ldap/config.mk
source4/libcli/ldap/ldap.c
source4/libcli/ldap/ldap.h
source4/libcli/ldap/ldap_client.c
source4/libcli/ldap/ldap_ldif.c
source4/torture/ldap/basic.c
source4/torture/ldap/common.c

index cfc0a262607ff8e57057c1386d6887304542f1c8..b31ba4d840a637ace92170f5150037434eb3ddf7 100644 (file)
@@ -122,7 +122,6 @@ extern int errno;
 #include "enums.h"
 #include "smb_macros.h"
 #include "smb.h"
-#include "libcli/ldap/ldap.h"
 #include "byteorder.h"
 #include "module.h"
 #include "mutex.h"
index f376609302366344b61a2f5045dbf6a07f6a6f4e..29d552d3cc672031ee1ebbd48e46305583423b68 100644 (file)
@@ -74,6 +74,8 @@ struct asn1_data;
 
 struct ldapsrv_call;
 struct ldapsrv_connection;
+struct ldap_connection;
+struct ldap_message;
 struct rw_buffer;
 struct registry_context;
 struct registry_key;
index 58c6dde436484cd2fecbfb36570013cee014f884..d87ea657d7b4fcbb9ef051f345e81d84878895a7 100644 (file)
 #include "includes.h"
 #include "ldap_server/ldap_server.h"
 #include "dlinklist.h"
+#include "libcli/ldap/ldap.h"
 
 
-struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, enum ldap_request_tag type)
+struct ldapsrv_reply *ldapsrv_init_reply(struct ldapsrv_call *call, uint8_t type)
 {
        struct ldapsrv_reply *reply;
 
@@ -47,7 +48,7 @@ NTSTATUS ldapsrv_queue_reply(struct ldapsrv_call *call, struct ldapsrv_reply *re
        return NT_STATUS_OK;
 }
 
-struct ldapsrv_partition *ldapsrv_get_partition(struct ldapsrv_connection *conn, const char *dn, enum ldap_scope scope)
+struct ldapsrv_partition *ldapsrv_get_partition(struct ldapsrv_connection *conn, const char *dn, uint8_t scope)
 {
        if (scope == LDAP_SEARCH_SCOPE_BASE
            && strcasecmp("", dn) == 0) {
index f397b7611bc60e9b52d4d9bd32056b5cd547fc79..d6b0332b6e5cc650d58124f9da8d5b807abe0a5a 100644 (file)
@@ -21,6 +21,7 @@
 #include "includes.h"
 #include "ldap_server/ldap_server.h"
 #include "auth/auth.h"
+#include "libcli/ldap/ldap.h"
 
 static NTSTATUS ldapsrv_BindSimple(struct ldapsrv_call *call)
 {
index 39052a76719001129bd64761de36ba6d420d3b6a..0a16394c09a240a2862c1aec48e49a91922de138 100644 (file)
@@ -19,6 +19,8 @@
    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
 */
 
+#include "libcli/ldap/ldap.h"
+
 struct rw_buffer {
        uint8_t *data;
        size_t ofs, length;
index 284edfd95e761a9ce0fca0afdeaf5f12bdcd0b43..87bfdfdbba5fc57585f6a02b3f5b2e00ca1937a3 100644 (file)
@@ -4,5 +4,6 @@
 ADD_OBJ_FILES = libcli/ldap/ldap.o \
                libcli/ldap/ldap_client.o \
                libcli/ldap/ldap_ldif.o
+NOPROTO=YES
 # End SUBSYSTEM LIBCLI_LDAP
 #################################
index 545759c494db5402ecb0744c9d8ab6d6b34d0fd2..4b449e5123ea8655b6c7990266265a2f3b1bd467 100644 (file)
@@ -27,6 +27,7 @@
 #include "system/iconv.h"
 #include "system/filesys.h"
 #include "asn_1.h"
+#include "libcli/ldap/ldap.h"
 
 /****************************************************************************
  *
index 8947562b7793fc2f1ca45691410fa865ab10b4a2..3e51e4f60f4327053179925d7d1251d63acda655 100644 (file)
@@ -317,4 +317,63 @@ struct ldap_parse_tree {
 #define LDAP_ALL_SEP "()&|=!"
 #define LDAP_CONNECTION_TIMEOUT 10000
 
+/* The following definitions come from libcli/ldap/ldap.c  */
+
+BOOL ldap_encode(struct ldap_message *msg, DATA_BLOB *result);
+BOOL ldap_decode(struct asn1_data *data, struct ldap_message *msg);
+BOOL ldap_parse_basic_url(TALLOC_CTX *mem_ctx, const char *url,
+                         char **host, uint16_t *port, BOOL *ldaps);
+
+/* The following definitions come from libcli/ldap/ldap_client.c  */
+
+struct ldap_connection *ldap_connect(TALLOC_CTX *mem_ctx, const char *url);
+struct ldap_message *new_ldap_message(TALLOC_CTX *mem_ctx);
+BOOL ldap_send_msg(struct ldap_connection *conn, struct ldap_message *msg,
+                  const struct timeval *endtime);
+BOOL ldap_receive_msg(struct ldap_connection *conn, struct ldap_message *msg,
+                     const struct timeval *endtime);
+struct ldap_message *ldap_receive(struct ldap_connection *conn, int msgid,
+                                 const struct timeval *endtime);
+struct ldap_message *ldap_transaction(struct ldap_connection *conn,
+                                     struct ldap_message *request);
+int ldap_bind_simple(struct ldap_connection *conn, const char *userdn, const char *password);
+int ldap_bind_sasl(struct ldap_connection *conn, const char *username, const char *domain, const char *password);
+struct ldap_connection *ldap_setup_connection(TALLOC_CTX *mem_ctx, const char *url, 
+                                               const char *userdn, const char *password);
+struct ldap_connection *ldap_setup_connection_with_sasl(TALLOC_CTX *mem_ctx, const char *url,
+                                                       const char *username, const char *domain, const char *password);
+BOOL ldap_abandon_message(struct ldap_connection *conn, int msgid,
+                                const struct timeval *endtime);
+BOOL ldap_setsearchent(struct ldap_connection *conn, struct ldap_message *msg,
+                      const struct timeval *endtime);
+struct ldap_message *ldap_getsearchent(struct ldap_connection *conn,
+                                      const struct timeval *endtime);
+void ldap_endsearchent(struct ldap_connection *conn,
+                      const struct timeval *endtime);
+struct ldap_message *ldap_searchone(struct ldap_connection *conn,
+                                   struct ldap_message *msg,
+                                   const struct timeval *endtime);
+BOOL ldap_find_single_value(struct ldap_message *msg, const char *attr,
+                           DATA_BLOB *value);
+BOOL ldap_find_single_string(struct ldap_message *msg, const char *attr,
+                            TALLOC_CTX *mem_ctx, char **value);
+BOOL ldap_find_single_int(struct ldap_message *msg, const char *attr,
+                         int *value);
+int ldap_error(struct ldap_connection *conn);
+NTSTATUS ldap2nterror(int ldaperror);
+
+/* The following definitions come from libcli/ldap/ldap_ldif.c  */
+
+BOOL add_value_to_attrib(TALLOC_CTX *mem_ctx, struct ldap_val *value,
+                        struct ldap_attribute *attrib);
+BOOL add_attrib_to_array_talloc(TALLOC_CTX *mem_ctx,
+                                      const struct ldap_attribute *attrib,
+                                      struct ldap_attribute **attribs,
+                                      int *num_attribs);
+BOOL add_mod_to_array_talloc(TALLOC_CTX *mem_ctx,
+                                   struct ldap_mod *mod,
+                                   struct ldap_mod **mods,
+                                   int *num_mods);
+struct ldap_message *ldap_ldif2msg(TALLOC_CTX *mem_ctx, const char *s);
+
 #endif
index ddf0932fa117a5645a218adc36795b75ec4c6e2c..11815ddd6d465fa1aff6ec9493f12e203fcb6613 100644 (file)
@@ -29,6 +29,7 @@
 #include "auth/auth.h"
 #include "asn_1.h"
 #include "dlinklist.h"
+#include "libcli/ldap/ldap.h"
 
 
 
index a0249a4ba0a141aab26f2b411793cb350c4dff5a..e5e5cdd6df2debb331d335de7280422176afc631 100644 (file)
@@ -25,6 +25,7 @@
 
 #include "includes.h"
 #include "system/iconv.h"
+#include "libcli/ldap/ldap.h"
 
 /****************************************************************************
  *
index 99f79c8c50c368e6494bc2917c3b3aeda98c21a3..936a8dbe510abcc050002bc20e4f1f06d1c419d9 100644 (file)
@@ -22,6 +22,7 @@
 */
 
 #include "includes.h"
+#include "libcli/ldap/ldap.h"
 
 BOOL test_bind_simple(struct ldap_connection *conn, const char *userdn, const char *password)
 {
index b9f0f5c655a68ab143c4101e3879f0b49810e28e..f421565cbd929dc34d852648b1ec32f59e7da872 100644 (file)
@@ -23,6 +23,7 @@
 
 #include "includes.h"
 #include "asn_1.h"
+#include "libcli/ldap/ldap.h"
 
 NTSTATUS torture_ldap_bind(struct ldap_connection *conn, const char *userdn, const char *password)
 {