From b38f1aee4092cd621081614dce34a86d0d70afff Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 3 Nov 2016 15:11:29 +0100 Subject: [PATCH] s3:utils: Use cli_cm_force_encryption() instead of cli_force_encryption() This allows SMB3 encryption instead of returning NT_STATUS_NOT_SUPPORTED. Signed-off-by: Stefan Metzmacher Reviewed-by: Andreas Schneider Autobuild-User(master): Andreas Schneider Autobuild-Date(master): Mon Dec 19 13:41:15 CET 2016 on sn-devel-144 --- source3/utils/net_util.c | 28 +++++----------------------- 1 file changed, 5 insertions(+), 23 deletions(-) diff --git a/source3/utils/net_util.c b/source3/utils/net_util.c index cc65457b766..86a46672f56 100644 --- a/source3/utils/net_util.c +++ b/source3/utils/net_util.c @@ -155,29 +155,11 @@ NTSTATUS connect_to_service(struct net_context *c, } if (c->smb_encrypt) { - nt_status = cli_force_encryption(*cli_ctx, - c->opt_user_name, - c->opt_password, - c->opt_workgroup); - - if (NT_STATUS_EQUAL(nt_status,NT_STATUS_NOT_SUPPORTED)) { - d_printf(_("Encryption required and " - "server that doesn't support " - "UNIX extensions - failing connect\n")); - } else if (NT_STATUS_EQUAL(nt_status,NT_STATUS_UNKNOWN_REVISION)) { - d_printf(_("Encryption required and " - "can't get UNIX CIFS extensions " - "version from server.\n")); - } else if (NT_STATUS_EQUAL(nt_status,NT_STATUS_UNSUPPORTED_COMPRESSION)) { - d_printf(_("Encryption required and " - "share %s doesn't support " - "encryption.\n"), service_name); - } else if (!NT_STATUS_IS_OK(nt_status)) { - d_printf(_("Encryption required and " - "setup failed with error %s.\n"), - nt_errstr(nt_status)); - } - + nt_status = cli_cm_force_encryption(*cli_ctx, + c->opt_user_name, + c->opt_password, + c->opt_workgroup, + service_name); if (!NT_STATUS_IS_OK(nt_status)) { cli_shutdown(*cli_ctx); *cli_ctx = NULL; -- 2.34.1