From 9802310b2aa919964f4f312cd99349d02cc12afc Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Wed, 13 Mar 2002 01:51:01 +0000 Subject: Ensure we never use "" as a domain name (Win9X apparently does this for 'net use' duirng login). Picked up from a post to a TNG list by Volker. Andrew Bartlett (This used to be commit f81882fc9510aadd7d1db77753b307800ab50f9b) --- source3/auth/auth_util.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index a4dea39d2d..587273d9b6 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -196,12 +196,17 @@ BOOL make_user_info_map(auth_usersupplied_info **user_info, fstrcpy(internal_username, smb_name); map_username(internal_username); - if (lp_allow_trusted_domains()) { + 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 + where it doens't supply a domain for logon script + 'net use' commands. + The way I do it here is by checking if the fully qualified username exists. This is rather reliant on winbind, but until we have a better method this -- cgit