]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
CVE-2017-12150: s3:libsmb: only fallback to anonymous if authentication was not requested
authorStefan Metzmacher <metze@samba.org>
Mon, 12 Dec 2016 05:07:56 +0000 (06:07 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 4 Sep 2017 09:35:31 +0000 (11:35 +0200)
With forced encryption or required signing we should also don't fallback.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12997

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/libsmb/clidfs.c

index 16b21bdf6de3d7cd3bc39630c10e280aa6f3e20b..0b7c281280b4d440632e0f91ea514123b33c0820 100644 (file)
@@ -203,7 +203,9 @@ static NTSTATUS do_connect(TALLOC_CTX *ctx,
                /* If a password was not supplied then
                 * try again with a null username. */
                if (password[0] || !username[0] ||
+                       force_encrypt || smbXcli_conn_signing_mandatory(c->conn) ||
                        get_cmdline_auth_info_use_kerberos(auth_info) ||
+                       get_cmdline_auth_info_use_ccache(auth_info) ||
                        !NT_STATUS_IS_OK(status = cli_session_setup(c, "",
                                                "", 0,
                                                "", 0,