It appears that the first time we see a uid/gid that winbind can't map,
commitebdb11132c65192efd1854300e54b3ba844d8c3d
authorDan Sledz <dan.sledz@isilon.com>
Tue, 3 Mar 2009 00:42:37 +0000 (2 16:42 -0800)
committerKarolin Seeger <kseeger@samba.org>
Fri, 6 Mar 2009 07:28:29 +0000 (6 08:28 +0100)
tree8b01a982721b7b92251242e51b61ea82db09bc9e
parent85b2eef569e6a253be79d0de697481fcc6a9acf2
It appears that the first time we see a uid/gid that winbind can't map,
we end up returning the null sid instead of falling back to the legacy
code.  Next time through the code we'll hit the negative cache and do
the right thing, but we still fail the first time.

If we fail the winbind id to sid mapping, call the legacy version.  This
catches the case where we don't have a negative cache entry for the mapping.
This is better than returning the NULL sid to the caller.
(cherry picked from commit c4d05e8e1fc776dd9c528513346256cf35c9f226)
source/passdb/lookup_sid.c