diff options
| author | Stefan Metzmacher <metze@samba.org> | 2014-09-21 09:20:26 +0200 |
|---|---|---|
| committer | Stefan Metzmacher <metze@samba.org> | 2014-09-23 01:34:05 +0200 |
| commit | f65c1f0e2f6a8c23a94003f61b0b98d963b2424b (patch) | |
| tree | f2cecce7bcc0f1318bf20176321a0adb6c960fbe /source4/libnet | |
| parent | 3b18dea1310cfe9e9b4ec0f2b3b5b14ac4771c83 (diff) | |
| download | samba-f65c1f0e2f6a8c23a94003f61b0b98d963b2424b.tar.gz samba-f65c1f0e2f6a8c23a94003f61b0b98d963b2424b.tar.xz samba-f65c1f0e2f6a8c23a94003f61b0b98d963b2424b.zip | |
s4:librpc: use authenticated epmapping for ncacn_http
We need to authenticate against the RpcProxy.
In future we could have a way to specify alternative credentials
for the RpcProxy and HttpProxy.
Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
Autobuild-User(master): Stefan Metzmacher <metze@samba.org>
Autobuild-Date(master): Tue Sep 23 01:34:05 CEST 2014 on sn-devel-104
Diffstat (limited to 'source4/libnet')
| -rw-r--r-- | source4/libnet/libnet_rpc.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/source4/libnet/libnet_rpc.c b/source4/libnet/libnet_rpc.c index 19838d4fe3..ec1931795b 100644 --- a/source4/libnet/libnet_rpc.c +++ b/source4/libnet/libnet_rpc.c @@ -25,7 +25,7 @@ #include "librpc/rpc/dcerpc_proto.h" #include "librpc/gen_ndr/ndr_lsa_c.h" #include "librpc/gen_ndr/ndr_samr.h" - +#include "auth/credentials/credentials.h" struct rpc_connect_srv_state { struct libnet_context *ctx; @@ -783,13 +783,19 @@ static void continue_epm_map_binding_send(struct composite_context *c) { struct rpc_connect_dci_state *s; struct composite_context *epm_map_req; + struct cli_credentials *epm_creds = NULL; + s = talloc_get_type(c->private_data, struct rpc_connect_dci_state); /* prepare to get endpoint mapping for the requested interface */ s->final_binding = dcerpc_binding_dup(s, s->lsa_pipe->binding); if (composite_nomem(s->final_binding, c)) return; - + + epm_creds = cli_credentials_init_anon(s); + if (composite_nomem(epm_creds, c)) return; + epm_map_req = dcerpc_epm_map_binding_send(c, s->final_binding, s->r.in.dcerpc_iface, + epm_creds, s->ctx->event_ctx, s->ctx->lp_ctx); if (composite_nomem(epm_map_req, c)) return; |
