From: Stefan Metzmacher Date: Sat, 17 Dec 2016 09:36:49 +0000 (+0100) Subject: CVE-2017-12151: s3:libsmb: make use of cli_state_is_encryption_on() X-Git-Tag: samba-4.5.14~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=157f2a703bcaca9495d50cbd4d48c24b1ceed80d;p=thirdparty%2Fsamba.git CVE-2017-12151: s3:libsmb: make use of cli_state_is_encryption_on() This will keep enforced encryption across dfs referrals. BUG: https://bugzilla.samba.org/show_bug.cgi?id=12996 Signed-off-by: Stefan Metzmacher --- diff --git a/source3/libsmb/clidfs.c b/source3/libsmb/clidfs.c index 0b7c281280b..d9c9e27b999 100644 --- a/source3/libsmb/clidfs.c +++ b/source3/libsmb/clidfs.c @@ -954,7 +954,7 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx, "IPC$", dfs_auth_info, false, - smb1cli_conn_encryption_on(rootcli->conn), + cli_state_is_encryption_on(rootcli), smbXcli_conn_protocol(rootcli->conn), 0, 0x20, @@ -1012,7 +1012,7 @@ NTSTATUS cli_resolve_path(TALLOC_CTX *ctx, dfs_refs[count].share, dfs_auth_info, false, - smb1cli_conn_encryption_on(rootcli->conn), + cli_state_is_encryption_on(rootcli), smbXcli_conn_protocol(rootcli->conn), 0, 0x20, diff --git a/source3/libsmb/libsmb_context.c b/source3/libsmb/libsmb_context.c index a956058c6d9..74adade9a81 100644 --- a/source3/libsmb/libsmb_context.c +++ b/source3/libsmb/libsmb_context.c @@ -486,7 +486,7 @@ smbc_option_get(SMBCCTX *context, for (s = context->internal->servers; s; s = s->next) { num_servers++; - if (!smb1cli_conn_encryption_on(s->cli->conn)) { + if (!cli_state_is_encryption_on(s->cli)) { return (void *)false; } }