summaryrefslogtreecommitdiff
path: root/source4/librpc/rpc/dcerpc_connect.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2017-07-20 13:05:39 +0200
committerAndreas Schneider <asn@cryptomilk.org>2017-08-07 15:20:02 +0200
commitb5854ecc98c3db4aba56f91035b79aabde0fc266 (patch)
tree6bf516ce676da27cfc681043de46f4c5dc83da42 /source4/librpc/rpc/dcerpc_connect.c
parent8d36bbe1874f47230d663e16de3c8e0e0800d997 (diff)
downloadsamba-b5854ecc98c3db4aba56f91035b79aabde0fc266.tar.gz
s4:librpc/rpc: pass down HTTP_AUTH_* values directly to dcerpc_pipe_open_roh_send()
They get passed to http_send_auth_request_send() unmodified. Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org>
Diffstat (limited to 'source4/librpc/rpc/dcerpc_connect.c')
-rw-r--r--source4/librpc/rpc/dcerpc_connect.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/source4/librpc/rpc/dcerpc_connect.c b/source4/librpc/rpc/dcerpc_connect.c
index bec7022f4d2..2206beff854 100644
--- a/source4/librpc/rpc/dcerpc_connect.c
+++ b/source4/librpc/rpc/dcerpc_connect.c
@@ -35,6 +35,7 @@
#include "auth/credentials/credentials.h"
#include "param/param.h"
#include "libcli/resolve/resolve.h"
+#include "lib/http/http.h"
struct dcerpc_pipe_connect {
struct dcecli_connection *conn;
@@ -431,7 +432,7 @@ struct pipe_http_state {
uint32_t http_proxy_port;
bool use_tls;
bool use_proxy;
- bool use_ntlm;
+ enum http_auth_method http_auth;
struct loadparm_context *lp_ctx;
};
@@ -565,15 +566,15 @@ static struct composite_context* dcerpc_pipe_connect_ncacn_http_send(
opt = dcerpc_binding_get_string_option(io->binding, "HttpAuthOption");
if (opt) {
if (strcasecmp(opt, "basic") == 0) {
- s->use_ntlm = false;
+ s->http_auth = HTTP_AUTH_BASIC;
} else if (strcasecmp(opt, "ntlm") == 0) {
- s->use_ntlm = true;
+ s->http_auth = HTTP_AUTH_NTLM;
} else {
composite_error(c, NT_STATUS_INVALID_PARAMETER_MIX);
return c;
}
} else {
- s->use_ntlm = true;
+ s->http_auth = HTTP_AUTH_NTLM;
}
subreq = dcerpc_pipe_open_roh_send(s->io.conn, s->localaddr,
@@ -582,7 +583,7 @@ static struct composite_context* dcerpc_pipe_connect_ncacn_http_send(
s->http_proxy, s->http_proxy_port,
s->use_tls, s->use_proxy,
s->io.creds, io->resolve_ctx,
- s->lp_ctx, s->use_ntlm);
+ s->lp_ctx, s->http_auth);
if (composite_nomem(subreq, c)) return c;
tevent_req_set_callback(subreq, continue_pipe_open_ncacn_http, c);