diff options
author | Andrew Tridgell <tridge@samba.org> | 2010-10-01 19:05:30 -0700 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2010-10-01 22:31:57 -0700 |
commit | 9bae4cd3d967f43c32796d03b1c2ee8ae5119e00 (patch) | |
tree | 71684b7e66a1d8436a603cbb9933ec33d010bfd8 /source4/librpc/rpc/dcerpc_auth.c | |
parent | ee15dc96926f505ba7f01ccfcfc2959b507f2b96 (diff) | |
download | samba-9bae4cd3d967f43c32796d03b1c2ee8ae5119e00.tar.gz samba-9bae4cd3d967f43c32796d03b1c2ee8ae5119e00.tar.bz2 samba-9bae4cd3d967f43c32796d03b1c2ee8ae5119e00.zip |
s4-rpc: added target_principal binding handle option
this allows you to specify a target SPN for a connection
Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>
Diffstat (limited to 'source4/librpc/rpc/dcerpc_auth.c')
-rw-r--r-- | source4/librpc/rpc/dcerpc_auth.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/source4/librpc/rpc/dcerpc_auth.c b/source4/librpc/rpc/dcerpc_auth.c index bca7a8d186..95fdbf2374 100644 --- a/source4/librpc/rpc/dcerpc_auth.c +++ b/source4/librpc/rpc/dcerpc_auth.c @@ -292,6 +292,17 @@ struct composite_context *dcerpc_bind_auth_send(TALLOC_CTX *mem_ctx, } } + if (p->binding && p->binding->target_principal) { + c->status = gensec_set_target_principal(sec->generic_state, + p->binding->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))); + composite_error(c, c->status); + return c; + } + } + c->status = gensec_start_mech_by_authtype(sec->generic_state, auth_type, auth_level); if (!NT_STATUS_IS_OK(c->status)) { |