summaryrefslogtreecommitdiff
path: root/source3/rpcclient
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2014-01-13 10:16:40 +0100
committerGünther Deschner <gd@samba.org>2014-01-16 16:22:52 +0100
commitdd42daa98dd0ba86116396a64d5e27826ffe2b49 (patch)
tree526911b5cb720c6433fb1654658b353fcbe6acb5 /source3/rpcclient
parent9b2dc0e46c154dccdc2f567442bca86bd807b17b (diff)
downloadsamba-dd42daa98dd0ba86116396a64d5e27826ffe2b49.tar.gz
s3:rpcclient: add support for DCERPC_AUTH_LEVEL_CONNECT
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Guenther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpcclient')
-rw-r--r--source3/rpcclient/rpcclient.c23
1 files changed, 11 insertions, 12 deletions
diff --git a/source3/rpcclient/rpcclient.c b/source3/rpcclient/rpcclient.c
index 9429e26f3be..c47c1507e5d 100644
--- a/source3/rpcclient/rpcclient.c
+++ b/source3/rpcclient/rpcclient.c
@@ -1065,6 +1065,10 @@ out_free:
binding->transport = NCACN_NP;
}
+ if (binding->flags & DCERPC_CONNECT) {
+ pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
+ pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
+ }
if (binding->flags & DCERPC_SIGN) {
pipe_default_auth_level = DCERPC_AUTH_LEVEL_INTEGRITY;
pipe_default_auth_type = DCERPC_AUTH_TYPE_NTLMSSP;
@@ -1078,12 +1082,6 @@ out_free:
pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
}
if (binding->flags & DCERPC_AUTH_NTLM) {
- /* If neither Integrity or Privacy are requested then
- * Use just Connect level */
- if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
- pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
- }
-
if (pipe_default_auth_type == DCERPC_AUTH_TYPE_SPNEGO) {
pipe_default_auth_spnego_type = PIPE_AUTH_TYPE_SPNEGO_NTLMSSP;
} else {
@@ -1091,18 +1089,19 @@ out_free:
}
}
if (binding->flags & DCERPC_AUTH_KRB5) {
- /* If neither Integrity or Privacy are requested then
- * Use just Connect level */
- if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
- pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
- }
-
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 (pipe_default_auth_type != DCERPC_AUTH_TYPE_NONE) {
+ /* If neither Integrity or Privacy are requested then
+ * Use just Connect level */
+ if (pipe_default_auth_level == DCERPC_AUTH_LEVEL_NONE) {
+ pipe_default_auth_level = DCERPC_AUTH_LEVEL_CONNECT;
+ }
+ }
if (get_cmdline_auth_info_use_kerberos(rpcclient_auth_info)) {
flags |= CLI_FULL_CONNECTION_USE_KERBEROS |