diff options
author | Andrew Bartlett <abartlet@samba.org> | 2002-01-18 08:12:10 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2002-01-18 08:12:10 +0000 |
commit | aea134de2c4d3e67c17263bdc8545bd6f6167199 (patch) | |
tree | ab4a12879a026f2b1ae02961ccdccff4ef208f71 /source3 | |
parent | efdb29d0e0f7737dcf21045bc560a1b9378886b4 (diff) | |
download | samba-aea134de2c4d3e67c17263bdc8545bd6f6167199.tar.gz samba-aea134de2c4d3e67c17263bdc8545bd6f6167199.tar.bz2 samba-aea134de2c4d3e67c17263bdc8545bd6f6167199.zip |
Don't do tridge's crazy 'am I a trusted domain' lookup for guests.
Andrew Bartlett
(This used to be commit 9bfe54a3d484919fe830f9c6ae01f67663974af2)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/auth/auth_util.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index 643c2e1996..0839b19665 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -198,7 +198,6 @@ BOOL make_user_info_map(auth_usersupplied_info **user_info, map_username(internal_username); if (lp_allow_trusted_domains()) { - char *user; /* 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 @@ -209,15 +208,19 @@ BOOL make_user_info_map(auth_usersupplied_info **user_info, on winbind, but until we have a better method this will have to do */ - asprintf(&user, "%s%s%s", - client_domain, lp_winbind_separator(), - smb_name); - if (Get_Pwnam(user) != NULL) { - domain = client_domain; - } else { - domain = lp_workgroup(); + + domain = client_domain; + + if ((smb_name) && (*smb_name)) { /* Don't do this for guests */ + char *user; + asprintf(&user, "%s%s%s", + client_domain, lp_winbind_separator(), + smb_name); + if (Get_Pwnam(user) == NULL) { + domain = lp_workgroup(); + } + free(user); } - free(user); } else { domain = lp_workgroup(); } |