summaryrefslogtreecommitdiff
path: root/source3/utils/net_util.c
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2016-11-18 18:17:52 +0100
committerRalph Boehme <slow@samba.org>2016-11-23 16:52:38 +0100
commit28fbc5ea2e39bf23808aee5035cfc2f58b7fbcfd (patch)
treeb0d964caadd2a8bd4b4d4e2181f22fc6405cc594 /source3/utils/net_util.c
parent1f91b6aa63df4c48c49dabf8b30cde33579da17f (diff)
downloadsamba-28fbc5ea2e39bf23808aee5035cfc2f58b7fbcfd.tar.gz
samba-28fbc5ea2e39bf23808aee5035cfc2f58b7fbcfd.tar.bz2
samba-28fbc5ea2e39bf23808aee5035cfc2f58b7fbcfd.zip
s3-net: use SMB_SIGNING_DEFAULT in connect_to_service()
For non IPC$ connections we get NT_STATUS_REVISION_MISMATCH otherwise when using the connection. Guenther Signed-off-by: Guenther Deschner <gd@samba.org> Reviewed-by: Ralph Boehme <slow@samba.org> Autobuild-User(master): Ralph Böhme <slow@samba.org> Autobuild-Date(master): Wed Nov 23 16:52:38 CET 2016 on sn-devel-144
Diffstat (limited to 'source3/utils/net_util.c')
-rw-r--r--source3/utils/net_util.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c
index de929ffd75d..cc65457b766 100644
--- a/source3/utils/net_util.c
+++ b/source3/utils/net_util.c
@@ -106,6 +106,7 @@ NTSTATUS connect_to_service(struct net_context *c,
{
NTSTATUS nt_status;
int flags = 0;
+ enum smb_signing_setting signing_setting = SMB_SIGNING_DEFAULT;
c->opt_password = net_prompt_pass(c, c->opt_user_name);
@@ -121,12 +122,16 @@ NTSTATUS connect_to_service(struct net_context *c,
flags |= CLI_FULL_CONNECTION_USE_CCACHE;
}
+ if (strequal(service_type, "IPC")) {
+ signing_setting = SMB_SIGNING_IPC_DEFAULT;
+ }
+
nt_status = cli_full_connection(cli_ctx, NULL, server_name,
server_ss, c->opt_port,
service_name, service_type,
c->opt_user_name, c->opt_workgroup,
c->opt_password, flags,
- SMB_SIGNING_IPC_DEFAULT);
+ signing_setting);
if (!NT_STATUS_IS_OK(nt_status)) {
d_fprintf(stderr, _("Could not connect to server %s\n"),
server_name);