summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-28 17:06:51 -0400
committerSimo Sorce <idra@samba.org>2010-07-30 14:55:27 -0400
commit0b24e8e869207dcb567b61272794daef48ee492a (patch)
treeca62173a0d4265da7c69d6e7b48dd763094f2f70 /source3/rpcclient
parente286b9c0bd7bf553f216d7c8288bb75a6b3dde95 (diff)
downloadsamba-0b24e8e869207dcb567b61272794daef48ee492a.tar.gz
samba-0b24e8e869207dcb567b61272794daef48ee492a.tar.bz2
samba-0b24e8e869207dcb567b61272794daef48ee492a.zip
s3-dcerpc: Add SPNEGO incapsulation for KRB5 auth
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c39
1 files changed, 22 insertions, 17 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 675fb1d947..565aaa8288 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -658,24 +658,29 @@ static NTSTATUS do_cmd(struct cli_state *cli,
&cmd_entry->rpc_pipe);
break;
case DCERPC_AUTH_TYPE_SPNEGO:
- if (pipe_default_auth_spnego_type !=
- PIPE_AUTH_TYPE_SPNEGO_NTLMSSP) {
- DEBUG(0, ("Could not initialise %s. "
- "Currently only NTLMSSP is "
- "supported for SPNEGO\n",
- get_pipe_name_from_syntax(
- talloc_tos(),
- cmd_entry->interface)));
- return NT_STATUS_UNSUCCESSFUL;
+ switch (pipe_default_auth_spnego_type) {
+ case PIPE_AUTH_TYPE_SPNEGO_NTLMSSP:
+ ntresult = cli_rpc_pipe_open_spnego_ntlmssp(
+ cli, cmd_entry->interface,
+ default_transport,
+ pipe_default_auth_level,
+ get_cmdline_auth_info_domain(auth_info),
+ get_cmdline_auth_info_username(auth_info),
+ get_cmdline_auth_info_password(auth_info),
+ &cmd_entry->rpc_pipe);
+ break;
+ case PIPE_AUTH_TYPE_SPNEGO_KRB5:
+ ntresult = cli_rpc_pipe_open_spnego_krb5(
+ cli, cmd_entry->interface,
+ default_transport,
+ pipe_default_auth_level,
+ cli->desthost,
+ NULL, NULL,
+ &cmd_entry->rpc_pipe);
+ break;
+ default:
+ ntresult = NT_STATUS_INTERNAL_ERROR;
}
- ntresult = cli_rpc_pipe_open_spnego_ntlmssp(
- cli, cmd_entry->interface,
- default_transport,
- pipe_default_auth_level,
- get_cmdline_auth_info_domain(auth_info),
- get_cmdline_auth_info_username(auth_info),
- get_cmdline_auth_info_password(auth_info),
- &cmd_entry->rpc_pipe);
break;
case DCERPC_AUTH_TYPE_NTLMSSP:
ntresult = cli_rpc_pipe_open_ntlmssp(