Fix bug 5696. The problem was when smbd
authorJeremy Allison <jra@samba.org>
Sun, 17 Aug 2008 02:23:38 +0000 (19:23 -0700)
committerJeremy Allison <jra@samba.org>
Sun, 17 Aug 2008 02:23:38 +0000 (19:23 -0700)
commitee6c02f7c8bc92190b9f5474057f5885f29c2f8a
treeeda184fcae43548cc60e67ec6a5f7e1658ef3aad
parent165f5c0c0a99d7da598a3c27355abaed1161cc7f
Fix bug 5696. The problem was when smbd
was asking for a winbindd name to SID lookup of
"Unix Group\name" where "name" was also a valid username,
the winbindd passdb lookup of that name was losing the
domain string info before calling lookup name (ie. lookup_name()
was being called with just the string "name", not the
full string "Unix Group\name").

The passdb backend of winbindd has to cope with
not only names from it's own global SAM domain,
but it does lookups for BUILTIN and "Unix User"
and "Unix Group" also, so making it guess by
losing the domain string is "A Bad Idea" (tm) :-).

Note that as winbind globally calls winbind_off()
at startup, it's safe for winbind to call sys_getgrnam()
to do the "Unix Group" lookup from inside lookup_name().

Jeremy.
(This used to be commit 5293af6c3cbfdde340e6add47b914b6ee6fd7b6f)
source3/winbindd/winbindd_passdb.c