passdb: Cache output from pdb_[ug]id_to_sid
authorVolker Lendecke <vl@samba.org>
Mon, 5 Jan 2015 15:34:29 +0000 (16:34 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 7 Jan 2015 11:00:09 +0000 (12:00 +0100)
commit2ec910dba4b7f5d6b96904bc38bf0899a4b46eab
treeca1c093ce030a1e87bce753d959b945f3657c482
parentce85c98caa27105a73f60223e92ea0184804780c
passdb: Cache output from pdb_[ug]id_to_sid

A customer complained that after upgrading to Samba 4.0 fileserver
its LDAP server was flooded with uid2sid and gid2sid request for id
0. With 4.0 we do a lot more user-space ACL checking which involves
uid2sid/gid2sid. This caches the corresponding results.

Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Volker Lendecke <vl@samba.org>
Autobuild-Date(master): Wed Jan  7 12:00:10 CET 2015 on sn-devel-104
source3/passdb/lookup_sid.c