s3:winbind_user: fix "getent passwd" to allocate new uids.
commit877808450bb108ed306ef77db97a3acc7297e579
authorMichael Adam <obnox@samba.org>
Sun, 1 Feb 2009 23:36:59 +0000 (2 00:36 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 1 Feb 2009 23:51:29 +0000 (2 00:51 +0100)
treecb0a6b4e256b24ec510746dbeea8236d7c131530
parentf2acdca4ded8646752d154d55a0ade405f159e17
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
source/winbindd/winbindd_user.c