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 | 9bfe54a3d484919fe830f9c6ae01f67663974af2 (patch) | |
tree | 14ebb391eff7b71a8ee9d582cb9a7806f26e4872 | |
parent | 7d05175494227bf30d098e04ec91c4f0a7b7184c (diff) | |
download | samba-9bfe54a3d484919fe830f9c6ae01f67663974af2.tar.gz samba-9bfe54a3d484919fe830f9c6ae01f67663974af2.tar.xz samba-9bfe54a3d484919fe830f9c6ae01f67663974af2.zip |
Don't do tridge's crazy 'am I a trusted domain' lookup for guests.
Andrew Bartlett
-rw-r--r-- | source/auth/auth_util.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/source/auth/auth_util.c b/source/auth/auth_util.c index 643c2e19963..0839b196658 100644 --- a/source/auth/auth_util.c +++ b/source/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(); } |