diff options
author | Gerald Carter <jerry@samba.org> | 2003-07-09 16:44:47 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2003-07-09 16:44:47 +0000 |
commit | 1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6 (patch) | |
tree | 2a7b6689c049b982d8c134e9803aab50e08f7985 /source/nsswitch/winbindd_util.c | |
parent | f005f1cf12b839f3985ab00315da63c584ce803e (diff) | |
download | samba-1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6.tar.gz samba-1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6.tar.xz samba-1111bc7b0c7165e1cdf8d90eb49f4c368d2eded6.zip |
Large set of changes to add UNIX account/group management
to winbindd. See README.idmap-and-winbind-changes for details.
Diffstat (limited to 'source/nsswitch/winbindd_util.c')
-rw-r--r-- | source/nsswitch/winbindd_util.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/source/nsswitch/winbindd_util.c b/source/nsswitch/winbindd_util.c index 28da415b9c3..1f123e896fe 100644 --- a/source/nsswitch/winbindd_util.c +++ b/source/nsswitch/winbindd_util.c @@ -415,18 +415,22 @@ BOOL parse_domain_user(const char *domuser, fstring domain, fstring user) { char *p = strchr(domuser,*lp_winbind_separator()); - if (!(p || lp_winbind_use_default_domain())) - return False; - - if(!p && lp_winbind_use_default_domain()) { + if ( !p ) { fstrcpy(user, domuser); - fstrcpy(domain, lp_workgroup()); - } else { + + if ( lp_winbind_use_default_domain() ) + fstrcpy(domain, lp_workgroup()); + else + fstrcpy( domain, "" ); + } + else { fstrcpy(user, p+1); fstrcpy(domain, domuser); domain[PTR_DIFF(p, domuser)] = 0; } + strupper_m(domain); + return True; } |