s3:winbind_user: fix "getent passwd" to allocate new uids.
commit481f38b7e3670c3eda4177fceec603d09d3c831f
authorMichael Adam <obnox@samba.org>
Sun, 1 Feb 2009 23:36:59 +0000 (2 00:36 +0100)
committerKarolin Seeger <kseeger@samba.org>
Mon, 16 Feb 2009 08:56:52 +0000 (16 09:56 +0100)
treef544989ebc5dfcfa1b44b34dba22f4aeec51cb98
parente95b16d9b274165ed0dc4a269c781560d667045d
s3:winbind_user: fix "getent passwd" to allocate new uids.

"getent passwd" used to fill the idmap cache with negative
cache entries for unmapped user sids.

Don't pass domain name unconditionally to idmap_sid_to_[ug]id().
idmap_sid_to_[ug]id() only creates new mappings (allocating
idmap backends tdb, tdb2, ldap...) when the domain name passed
in is "".

Note that it is _wrong_ to directly call the idmap_sid_to_[ug]id()
functions here, in the main winbindd. The correct fix would be
to send a sid_to_[ug]id request to winbindd itself, but this needs
more work to prepare the async mechanisms, and we nee a quick
fix for getent passwd now.

Michael
(cherry picked from commit 877808450bb108ed306ef77db97a3acc7297e579)
source/winbindd/winbindd_user.c