summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-20 17:26:32 -0400
committerSimo Sorce <idra@samba.org>2010-07-28 12:20:01 -0400
commitb00f9a0a2d3b692dd12e182a2a4a7979c626dec7 (patch)
treef1b94ca87ff3b1a524008b8788e706e859818b6c
parent2463a871776bb4de8653d6a44469d2adb3ec9418 (diff)
downloadsamba-b00f9a0a2d3b692dd12e182a2a4a7979c626dec7.tar.gz
samba-b00f9a0a2d3b692dd12e182a2a4a7979c626dec7.tar.bz2
samba-b00f9a0a2d3b692dd12e182a2a4a7979c626dec7.zip
s3-rpcclient: Allow choosing spnego mech: (ntlm/krb5)
-rw-r--r--source3/rpcclient/rpcclient.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 7f16bdb110..8b422a28a1 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -998,11 +998,18 @@ out_free:
pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
}
if (binding->flags & DCERPC_AUTH_NTLM) {
- pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
+ if (pipe_default_auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
+ pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
+ } else {
+ pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
+ }
}
if (binding->flags & DCERPC_AUTH_KRB5) {
- pipe_default_auth_type = DCERPC_AUTH_TYPE_SPNEGO;
- pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_KRB5;
+ if (pipe_default_auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
+ pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_KRB5;
+ } else {
+ pipe_default_auth_type = DCERPC_AUTH_TYPE_KRB5;
+ }
}
if (get_cmdline_auth_info_use_kerberos(rpcclient_auth_info)) {