summaryrefslogtreecommitdiffstats
path: root/source4/librpc
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-02-04 03:05:37 +0100
committerGünther Deschner <gd@samba.org>2014-02-13 11:54:18 +0100
commit4afe367c08cbe9574f28fae23133462ba10c57b7 (patch)
tree928ede1209531df8acdc4baeef8de7c9bcbeaa2a /source4/librpc
parentf309d67fcd3051628a1cc9d147d5a0bf56e2e286 (diff)
downloadsamba-4afe367c08cbe9574f28fae23133462ba10c57b7.tar.gz
samba-4afe367c08cbe9574f28fae23133462ba10c57b7.tar.xz
samba-4afe367c08cbe9574f28fae23133462ba10c57b7.zip
s4:librpc/rpc: use dcerpc_binding_get_string_option("target_principal")
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source4/librpc')
-rw-r--r--source4/librpc/rpc/dcerpc_auth.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c
index bace29a9d64..0714c93a61d 100644
--- a/source4/librpc/rpc/dcerpc_auth.c
+++ b/source4/librpc/rpc/dcerpc_auth.c
@@ -271,8 +271,8 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx,
struct bind_auth_state *state;
struct dcecli_security *sec;
struct tevent_req *subreq;
-
struct ndr_syntax_id syntax, transfer_syntax;
+ const char *target_principal = NULL;
/* composite context allocation and setup */
c = composite_create(mem_ctx, p->conn->event_ctx);
@@ -328,12 +328,16 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx,
}
}
- if (p->binding && p->binding->target_principal) {
+ if (p->binding != NULL) {
+ target_principal = dcerpc_binding_get_string_option(p->binding,
+ "target_principal");
+ }
+ if (target_principal != NULL) {
c->status = gensec_set_target_principal(sec->generic_state,
- p->binding->target_principal);
+ target_principal);
if (!NT_STATUS_IS_OK(c->status)) {
DEBUG(1, ("Failed to set GENSEC target principal to %s: %s\n",
- p->binding->target_principal, nt_errstr(c->status)));
+ target_principal, nt_errstr(c->status)));
composite_error(c, c->status);
return c;
}