summaryrefslogtreecommitdiff
path: root/source3/auth/auth_util.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r--source3/auth/auth_util.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index f942b2e50a..892e5c4ab7 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -226,14 +226,18 @@ NTSTATUS make_user_info_map(auth_usersupplied_info **user_info,
if (!is_trusted_domain(domain) &&
!strequal(domain, get_global_sam_name()) )
{
- domain = get_global_sam_name();
- DEBUG(5, ("Mapped domain from [%s] to [%s] for user [%s] on "
+ if (lp_map_untrusted_to_domain())
+ domain = my_sam_name();
+ else
+ domain = get_global_sam_name();
+ DEBUG(5, ("Mapped domain from [%s] to [%s] for user [%s] from "
"workstation [%s]\n",
client_domain, domain, smb_name, wksta_name));
}
- /* we know that it is a trusted domain (and we are allowing them) or it
- * is our domain */
+ /* We know that the given domain is trusted (and we are allowing them),
+ * it is our global SAM name, or for legacy behavior it is our
+ * primary domain name */
result = make_user_info(user_info, smb_name, internal_username,
client_domain, domain, wksta_name,