From: Stefan Metzmacher Date: Wed, 2 Mar 2022 13:32:41 +0000 (+0100) Subject: s4:auth: a simple bind uses the DCs name as workstation X-Git-Tag: tevent-0.12.0~495 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=31db704882bbcd569c2abb764ac1d3691ee0a267;p=thirdparty%2Fsamba.git s4:auth: a simple bind uses the DCs name as workstation I've seen that in LogonSamLogonEx request triggered by a simple bind with a user of a trusted domain within the same forest. Note simple binds don't work with users for another forest/external domain, as the DsCrackNames call on the bind_dn fails. BUG: https://bugzilla.samba.org/show_bug.cgi?id=13879 BUG: https://bugzilla.samba.org/show_bug.cgi?id=14641 Signed-off-by: Stefan Metzmacher Reviewed-by: Andrew Bartlett --- diff --git a/source4/auth/ntlm/auth_simple.c b/source4/auth/ntlm/auth_simple.c index b2e76381395..f767adb3696 100644 --- a/source4/auth/ntlm/auth_simple.c +++ b/source4/auth/ntlm/auth_simple.c @@ -26,6 +26,7 @@ #include "lib/util/tevent_ntstatus.h" #include "auth/auth.h" #include "dsdb/samdb/samdb.h" +#include "lib/param/param.h" #undef DBGC_CLASS #define DBGC_CLASS DBGC_AUTH @@ -80,7 +81,7 @@ _PUBLIC_ struct tevent_req *authenticate_ldap_simple_bind_send(TALLOC_CTX *mem_c /* No client.domain_name, use account_name instead */ /* user_info->mapped.* will be filled below */ - user_info->workstation_name = NULL; + user_info->workstation_name = lpcfg_netbios_name(lp_ctx); user_info->remote_host = remote_address; user_info->local_host = local_address;