summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2009-11-12 16:45:33 +0100
committerGünther Deschner <gd@samba.org>2009-11-13 01:13:06 +0100
commit3732798008f26052c030e8a8fc9c9404fd6f5669 (patch)
tree017f81f556305e200a3d11b96eba8969ff70f8f1 /source3
parentd2a9f4a2729026da11780ae4b71e289982094bd7 (diff)
downloadsamba-3732798008f26052c030e8a8fc9c9404fd6f5669.tar.gz
samba-3732798008f26052c030e8a8fc9c9404fd6f5669.tar.bz2
samba-3732798008f26052c030e8a8fc9c9404fd6f5669.zip
s3-rpcclient: use the parsed binding string flags for auth choice.
This allows rpcclient to be called like this: rpcclient ncacn_ip_tcp:w2k8r2[sign,seal] -U administrator%secret -c "dscracknames gd" Guenther
Diffstat (limited to 'source3')
-rw-r--r--source3/rpcclient/rpcclient.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index dbf7f1ff7e..5f59c26583 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -965,6 +965,24 @@ out_free:
binding->transport = NCACN_NP;
}
+ if (binding->flags & DCERPC_SIGN) {
+ pipe_default_auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
+ pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_SEAL) {
+ pipe_default_auth_level = DCERPC_AUTH_LEVEL_PRIVACY;
+ pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_AUTH_SPNEGO) {
+ pipe_default_auth_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_AUTH_NTLM) {
+ pipe_default_auth_type = PIPE_AUTH_TYPE_NTLMSSP;
+ }
+ if (binding->flags & DCERPC_AUTH_KRB5) {
+ pipe_default_auth_type = PIPE_AUTH_TYPE_SPNEGO_KRB5;
+ }
+
if (get_cmdline_auth_info_use_kerberos(rpcclient_auth_info)) {
flags |= CLI_FULL_CONNECTION_USE_KERBEROS |
CLI_FULL_CONNECTION_FALLBACK_AFTER_KERBEROS;