From: Volker Lendecke Date: Sun, 27 Dec 2015 11:37:25 +0000 (+0100) Subject: tldap: Add tldap_get/set_stream X-Git-Tag: talloc-2.1.7~239 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=830fd785a24baab90601d13f2556559f99a416d2;p=thirdparty%2Fsamba.git tldap: Add tldap_get/set_stream This will be used to replace a nonencrypted socket with a sasl sealed one. Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison --- diff --git a/source3/include/tldap.h b/source3/include/tldap.h index 0d7e55df9ca..74279a4ba18 100644 --- a/source3/include/tldap.h +++ b/source3/include/tldap.h @@ -117,6 +117,10 @@ bool tevent_req_ldap_error(struct tevent_req *req, TLDAPRC rc); bool tevent_req_is_ldap_error(struct tevent_req *req, TLDAPRC *perr); struct tldap_context *tldap_context_create(TALLOC_CTX *mem_ctx, int fd); +struct tstream_context *tldap_get_tstream(struct tldap_context *ld); +void tldap_set_tstream(struct tldap_context *ld, + struct tstream_context *stream); + bool tldap_connection_ok(struct tldap_context *ld); bool tldap_context_setattr(struct tldap_context *ld, const char *name, const void *pptr); diff --git a/source3/lib/tldap.c b/source3/lib/tldap.c index 6f42e6120be..5fcb43c29f4 100644 --- a/source3/lib/tldap.c +++ b/source3/lib/tldap.c @@ -196,6 +196,17 @@ static size_t tldap_pending_reqs(struct tldap_context *ld) return talloc_array_length(ld->pending); } +struct tstream_context *tldap_get_tstream(struct tldap_context *ld) +{ + return ld->conn; +} + +void tldap_set_tstream(struct tldap_context *ld, + struct tstream_context *stream) +{ + ld->conn = stream; +} + static struct tldap_ctx_attribute *tldap_context_findattr( struct tldap_context *ld, const char *name) {