Fix bug 5696. The problem was when smbd
commit8ecf61fb38879dba5755558c023317321fd2081e
authorJeremy Allison <jra@samba.org>
Sun, 17 Aug 2008 02:25:22 +0000 (16 19:25 -0700)
committerKarolin Seeger <kseeger@samba.org>
Mon, 18 Aug 2008 13:09:30 +0000 (18 15:09 +0200)
treed18b55dd4fbfc655a39a731840c748f293a392e1
parentd4c0b4a4e566fd971c8842c4389d11cc5c09d150
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.
(cherry picked from commit 780a4ff80dfd03a2c422920dbd101e8f58f7136e)
source/winbindd/winbindd_passdb.c