rpcclient: Use DCERPC_AUTH_LEVEL_CONNECT if no sign/seal is set for ntlmssp
authorSimo Sorce <idra@samba.org>
Fri, 30 Jul 2010 00:07:19 +0000 (20:07 -0400)
committerSimo Sorce <idra@samba.org>
Fri, 30 Jul 2010 18:55:27 +0000 (14:55 -0400)
source3/rpcclient/rpcclient.c

index f5f1f01df65b436fdf5bc51b81f34d6d3fd3d1d1..675fb1d947c72b558b2340914d8c6a3a7e4b1f8b 100644 (file)
@@ -1007,6 +1007,12 @@ 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 {