summaryrefslogtreecommitdiff
path: root/source3/utils/net_util.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2016-11-03 15:11:29 +0100
committerAndreas Schneider <asn@cryptomilk.org>2016-12-19 13:41:15 +0100
commitb38f1aee4092cd621081614dce34a86d0d70afff (patch)
tree1a12b18d0ff048ccf473624a5b2958f64863296e /source3/utils/net_util.c
parent6e122eef71c05c76d26ffce0ce7c4c4750f428f8 (diff)
downloadsamba-b38f1aee4092cd621081614dce34a86d0d70afff.tar.gz
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 <metze@samba.org> Reviewed-by: Andreas Schneider <asn@samba.org> Autobuild-User(master): Andreas Schneider <asn@cryptomilk.org> Autobuild-Date(master): Mon Dec 19 13:41:15 CET 2016 on sn-devel-144
Diffstat (limited to 'source3/utils/net_util.c')
-rw-r--r--source3/utils/net_util.c28
1 files 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;