]> 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)
committerKarolin Seeger <kseeger@samba.org>
Wed, 13 Sep 2017 16:19:49 +0000 (09:19 -0700)
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 d2a4c194f44986782c34de18ba334619df80f330..3b3e6b9dc74e46b70396d9eaa6eeda4a50631c8d 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,