summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2022-03-02 14:32:41 +0100
committerJule Anger <janger@samba.org>2022-03-16 13:41:14 +0000
commit9898afd747f790521cacca91e64bb9e9838b8817 (patch)
tree6a654ffee31e6da51fbddd8b5703bb0e7794c003
parent80f35f7ab6a992d8b93c1e12b061039ee64d117b (diff)
downloadsamba-9898afd747f790521cacca91e64bb9e9838b8817.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.c3
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;