summaryrefslogtreecommitdiff
path: root/source3/auth/auth_util.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-06-28 08:29:42 +0000
committerGerald Carter <jerry@samba.org>2003-06-28 08:29:42 +0000
commit8a6fc79ad8d9f1b6c4f604b173426bf821f98208 (patch)
tree6cfda8b5d1f1b94c9471c98b91277cd1e4b10500 /source3/auth/auth_util.c
parentb2fbc05c6bfd92354c8970c66581a32daaf6e6a3 (diff)
downloadsamba-8a6fc79ad8d9f1b6c4f604b173426bf821f98208.tar.gz
samba-8a6fc79ad8d9f1b6c4f604b173426bf821f98208.tar.bz2
samba-8a6fc79ad8d9f1b6c4f604b173426bf821f98208.zip
add check for NT_STATUS_NOT_IMPLEMENTED in auth check so that
map to guest = bad user works again when "trustdomain" is listed as last auth method. Also clean up some more DC location calls. (This used to be commit 77a5b1032f39b8d20925721b719fdcfff910cb06)
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r--source3/auth/auth_util.c31
1 files changed, 10 insertions, 21 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 7d0f44f1d1..fe4900f9f4 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -204,32 +204,22 @@ NTSTATUS make_user_info_map(auth_usersupplied_info **user_info,
DEBUG(5, ("make_user_info_map: Mapping user [%s]\\[%s] from workstation [%s]\n",
client_domain, smb_name, wksta_name));
- if (lp_allow_trusted_domains() && *client_domain) {
-
- /* the client could have given us a workstation name
- or other crap for the workgroup - we really need a
- way of telling if this domain name is one of our
- trusted domain names
-
- Also don't allow "" as a domain, fixes a Win9X bug
+ /* don't allow "" as a domain, fixes a Win9X bug
where it doens't supply a domain for logon script
- 'net use' commands.
-
- Finally, we do this by looking up a cache of trusted domains!
- */
+ 'net use' commands.*/
+ if ( *client_domain )
domain = client_domain;
+ else
+ domain = lp_workgroup();
- if (is_trusted_domain(domain)) {
- return make_user_info(user_info, smb_name, internal_username,
- client_domain, domain, wksta_name,
- lm_pwd, nt_pwd, plaintext, ntlmssp_flags,
- encrypted);
- }
+ /* do what win2k does. Always map unknown domains to our own
+ and let the "passdb backend" handle unknown users */
- } else {
+ if ( !is_trusted_domain(domain) )
domain = lp_workgroup();
- }
+
+ /* we know that it is a trusted domain (and we are allowing them) or it is our domain */
return make_user_info(user_info,
smb_name, internal_username,
@@ -238,7 +228,6 @@ NTSTATUS make_user_info_map(auth_usersupplied_info **user_info,
lm_pwd, nt_pwd,
plaintext,
ntlmssp_flags, encrypted);
-
}
/****************************************************************************