From aea134de2c4d3e67c17263bdc8545bd6f6167199 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Jan 2002 08:12:10 +0000 Subject: Don't do tridge's crazy 'am I a trusted domain' lookup for guests. Andrew Bartlett (This used to be commit 9bfe54a3d484919fe830f9c6ae01f67663974af2) --- source3/auth/auth_util.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'source3') 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(); } -- cgit