From b00f9a0a2d3b692dd12e182a2a4a7979c626dec7 Mon Sep 17 00:00:00 2001 From: Simo Sorce Date: Tue, 20 Jul 2010 17:26:32 -0400 Subject: s3-rpcclient: Allow choosing spnego mech: (ntlm/krb5) --- source3/rpcclient/rpcclient.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'source3') 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)) { -- cgit