diff options
Diffstat (limited to 'source4/libcli/ldap')
-rw-r--r-- | source4/libcli/ldap/config.mk | 19 | ||||
-rw-r--r-- | source4/libcli/ldap/ldap_bind.c | 5 | ||||
-rw-r--r-- | source4/libcli/ldap/ldap_client.c | 12 | ||||
-rw-r--r-- | source4/libcli/ldap/ldap_ndr.h | 2 |
4 files changed, 19 insertions, 19 deletions
diff --git a/source4/libcli/ldap/config.mk b/source4/libcli/ldap/config.mk index 0c5236c138..02678eed7a 100644 --- a/source4/libcli/ldap/config.mk +++ b/source4/libcli/ldap/config.mk @@ -1,17 +1,18 @@ [SUBSYSTEM::LIBCLI_LDAP] -PRIVATE_PROTO_HEADER = ldap_proto.h -OBJ_FILES = ldap.o \ - ldap_client.o \ - ldap_bind.o \ - ldap_msg.o \ - ldap_ildap.o \ - ldap_controls.o PUBLIC_DEPENDENCIES = LIBSAMBA-ERRORS LIBEVENTS LIBPACKET PRIVATE_DEPENDENCIES = LIBCLI_COMPOSITE samba-socket NDR_SAMR LIBTLS ASN1_UTIL \ LDAP_ENCODE LIBNDR LP_RESOLVE gensec -PUBLIC_HEADERS += libcli/ldap/ldap.h libcli/ldap/ldap_ndr.h +LIBCLI_LDAP_OBJ_FILES = $(addprefix $(libclisrcdir)/ldap/, \ + ldap.o ldap_client.o ldap_bind.o \ + ldap_msg.o ldap_ildap.o ldap_controls.o) + + +PUBLIC_HEADERS += $(libclisrcdir)/ldap/ldap.h $(libclisrcdir)/ldap/ldap_ndr.h + +$(eval $(call proto_header_template,$(libclisrcdir)/ldap/ldap_proto.h,$(LIBCLI_LDAP_OBJ_FILES:.o=.c))) [SUBSYSTEM::LDAP_ENCODE] -OBJ_FILES = ldap_ndr.o # FIXME PRIVATE_DEPENDENCIES = LIBLDB + +LDAP_ENCODE_OBJ_FILES = $(libclisrcdir)/ldap/ldap_ndr.o diff --git a/source4/libcli/ldap/ldap_bind.c b/source4/libcli/ldap/ldap_bind.c index 2c04edf950..e1569e7296 100644 --- a/source4/libcli/ldap/ldap_bind.c +++ b/source4/libcli/ldap/ldap_bind.c @@ -200,7 +200,7 @@ static struct ldap_message *new_ldap_sasl_bind_msg(struct ldap_connection *conn, /* perform a sasl bind using the given credentials */ -_PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, +_PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, struct cli_credentials *creds, struct loadparm_context *lp_ctx) { @@ -223,7 +223,8 @@ _PUBLIC_ NTSTATUS ldap_bind_sasl(struct ldap_connection *conn, gensec_init(lp_ctx); - status = gensec_client_start(conn, &conn->gensec, NULL, lp_ctx); + status = gensec_client_start(conn, &conn->gensec, + conn->event.event_ctx, lp_ctx); if (!NT_STATUS_IS_OK(status)) { DEBUG(0, ("Failed to start GENSEC engine (%s)\n", nt_errstr(status))); goto failed; diff --git a/source4/libcli/ldap/ldap_client.c b/source4/libcli/ldap/ldap_client.c index 296a7b11f2..bca867b033 100644 --- a/source4/libcli/ldap/ldap_client.c +++ b/source4/libcli/ldap/ldap_client.c @@ -48,17 +48,13 @@ _PUBLIC_ struct ldap_connection *ldap4_new_connection(TALLOC_CTX *mem_ctx, { struct ldap_connection *conn; - conn = talloc_zero(mem_ctx, struct ldap_connection); - if (conn == NULL) { + if (ev == NULL) { return NULL; } - if (ev == NULL) { - ev = event_context_init(conn); - if (ev == NULL) { - talloc_free(conn); - return NULL; - } + conn = talloc_zero(mem_ctx, struct ldap_connection); + if (conn == NULL) { + return NULL; } conn->next_messageid = 1; diff --git a/source4/libcli/ldap/ldap_ndr.h b/source4/libcli/ldap/ldap_ndr.h index dfbb723c36..ee1f702c78 100644 --- a/source4/libcli/ldap/ldap_ndr.h +++ b/source4/libcli/ldap/ldap_ndr.h @@ -1,6 +1,8 @@ #ifndef __LIBCLI_LDAP_LDAP_NDR_H__ #define __LIBCLI_LDAP_LDAP_NDR_H__ +#include "librpc/gen_ndr/ndr_misc.h" + char *ldap_encode_ndr_uint32(TALLOC_CTX *mem_ctx, uint32_t value); char *ldap_encode_ndr_dom_sid(TALLOC_CTX *mem_ctx, const struct dom_sid *sid); char *ldap_encode_ndr_GUID(TALLOC_CTX *mem_ctx, struct GUID *guid); |