From 1fb9ccc4e2a91bf7124fba076ffa5458a1cbf404 Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Fri, 18 Jan 2002 02:37:55 +0000 Subject: This is the 'winbind default domain' patch from Alexander Bokovoy . The idea is the domain\username is rather harsh for unix systems - people don't expect to have to FTP, SSH and (in particular) e-mail with a username like that. This 'corrects' that - but is not without its own problems. As you can see from the changes to files like username.c and wb_client.c (smbd's winbind client code) a lot of assumptions are made in a lot of places about lp_winbind_seperator determining a users's status as a domain or local user. The main change I will shortly be making is to investigate and kill off winbind_initgroups() - as far as I know it was a workaround for an old bug in winbind itself (and a bug in RH 5.2) and should no longer be relevent. I am also going to move to using the 'winbind uid' and 'winbind gid' paramaters to determine a user/groups's 'local' status, rather than the presence of the seperator. As such, this functionality is recommended for servers providing unix services, but is currently less than optimal for windows clients. (TODO: remove all references to lp_winbind_seperator() and lp_winbind_use_default_domain() from smbd) Andrew Bartlett (This used to be commit 07a21fcd2311d2d9b430b99303e3532a8c1159e4) --- source3/nsswitch/wbinfo.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) (limited to 'source3/nsswitch/wbinfo.c') diff --git a/source3/nsswitch/wbinfo.c b/source3/nsswitch/wbinfo.c index ab5d98bf9e..c6a0b040cb 100644 --- a/source3/nsswitch/wbinfo.c +++ b/source3/nsswitch/wbinfo.c @@ -66,8 +66,11 @@ static BOOL parse_wbinfo_domain_user(const char *domuser, fstring domain, fstrin char *p = strchr(domuser,get_winbind_separator()); - if (!p) - return False; + if (!p) { + fstrcpy(user, domuser); + domain[0]=0; + return True; + } fstrcpy(user, p+1); fstrcpy(domain, domuser); @@ -361,17 +364,11 @@ static BOOL wbinfo_auth_crap(char *username) fstring name_domain; fstring pass; char *p; - char sep = get_winbind_separator(); /* * Don't do the lookup if the name has no separator. */ - if (!strchr(username, sep)) { - printf("no domain seperator (%c) in username - failing\n", sep); - return False; - } - /* Send off request */ ZERO_STRUCT(request); -- cgit