s3:winbind_group: fix "getent group" to allocate new gids.
authorMichael Adam <obnox@samba.org>
Sun, 1 Feb 2009 23:46:57 +0000 (00:46 +0100)
committerMichael Adam <obnox@samba.org>
Sun, 1 Feb 2009 23:53:05 +0000 (00:53 +0100)
commitd75b3913c9e03ff97336aa7a6e1cbac2eb03f230
tree32d8166ba8b1d4f1e951a2c1a8f285ac860bf6a5
parenta0d05192006c4bade760bd945ab91b5268ca47a6
s3:winbind_group: fix "getent group" to allocate new gids.

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

Don't pass domain name unconditionally to idmap_sid_to_gid().
idmap_sid_to_gid() 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_gid()
functions here, in the main winbindd. The correct fix would be
to send a sid_to_gid 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
source3/winbindd/winbindd_group.c