diff options
author | Stefan Metzmacher <metze@samba.org> | 2022-03-02 14:32:41 +0100 |
---|---|---|
committer | Jule Anger <janger@samba.org> | 2022-03-16 14:27:11 +0000 |
commit | dd91493ed62fd2118f7a896e51251d3b3ea6493d (patch) | |
tree | 572f90a67a41da6da5252c76d3210332ca46e56c | |
parent | e7a0e1db90d1accd7b3602e5d0a088de74bd329d (diff) | |
download | samba-dd91493ed62fd2118f7a896e51251d3b3ea6493d.tar.gz |
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 <metze@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
(cherry picked from commit 31db704882bbcd569c2abb764ac1d3691ee0a267)
-rw-r--r-- | source4/auth/ntlm/auth_simple.c | 3 |
1 files changed, 2 insertions, 1 deletions
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; |