]> git.ipfire.org Git - thirdparty/samba.git/commit
Fix uid_to_sid mapping when the idmap cache is empty.
authorMichael Adam <obnox@samba.org>
Wed, 1 Oct 2008 06:30:15 +0000 (08:30 +0200)
committerMichael Adam <obnox@samba.org>
Thu, 25 Dec 2008 11:13:50 +0000 (12:13 +0100)
commitd4bc1f8d79929dc1a1d06e92eaf85923a1848e6f
tree4e90099cb19d7b74638fd6600304f982eeef9cab
parent44ab658b6d80c66f20d80aede7fc7cd2b9a941b1
Fix uid_to_sid mapping when the idmap cache is empty.

This failed for backends other than passed, since
idmap_backends_unixid_to_sid() always asked passdb first,
which returned Success no matter whether a mapping was
found or not.

One effect wast that getpwuid failed after "net cache flush".
Only after filling the cache with a getpwnam call it succeeded.

This fix makes the behaviour of idmap_backends_unixid_to_sid()
exactly the same as that of idmap_backends_sid_to_unixid()

Michael
(cherry picked from commit da7eb5e22e56ea718e393375085cf66a90afafc8)

Signed-off-by: Michael Adam <obnox@samba.org>
source/winbindd/idmap.c