This changes the behaviour for out-of-range queries: The tdb backend
(probably all backends) returns NT_STATUS_NONE_MAPPED and does not set the
map.status value to ID_UNMAPPED. This means that we did an early error
exit, not setting a negative cache value. This makes smbd ask winbind
over and over again for out-of-range gids, which can be a performance
problem in certain scenarios.
The new code makes us fall through to the code setting the negative
cache entry in all cases.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Michael Adam <obnox@samba.org>
Autobuild-User(master): Michael Adam <obnox@samba.org>
Autobuild-Date(master): Fri May 3 14:48:35 CEST 2013 on sn-devel-104
if ( ! NT_STATUS_IS_OK(ret)) {
DEBUG(10, ("error mapping uid [%lu]: %s\n", (unsigned long)uid,
nt_errstr(ret)));
- return ret;
+ map.status = ID_UNMAPPED;
}
if (map.status != ID_MAPPED) {
if ( ! NT_STATUS_IS_OK(ret)) {
DEBUG(10, ("error mapping gid [%lu]: %s\n", (unsigned long)gid,
nt_errstr(ret)));
- return ret;
+ map.status = ID_UNMAPPED;
}
if (map.status != ID_MAPPED) {