[PATCH] Use idmap cache for all pdb backends.

Alexander Werth werth at linux.vnet.ibm.com
Wed Apr 30 08:15:38 MDT 2014

On Wed, 2014-04-30 at 15:51 +0200, Volker Lendecke wrote:
> On Wed, Apr 30, 2014 at 03:16:45PM +0200, Alexander Werth wrote:
> > Currently only the passdb ldapsam backend uses the idmap cache.
> > And even that only uses the cache when the option ldapsam:trusted is set.
> > By moving the set cache entry calls up one layer all passdb backends
> > will use the idmap cache.
> > Without the idmap cache any id<->sid mapping request from ACLs for
> > example would result in another set of ldap queries. Up to the point
> > where the LDAP would be overloaded.
> Looks good to me, thanks. When compiling I now get
> [2299/4156] Compiling source3/passdb/pdb_ldap.c
> ../source3/passdb/pdb_ldap.c: In function ‘ldapsam_uid_to_sid’:
> ../source3/passdb/pdb_ldap.c:5014:16: warning: variable ‘id’ set but not used [-Wunused-but-set-variable]
> ../source3/passdb/pdb_ldap.c: In function ‘ldapsam_gid_to_sid’:
> ../source3/passdb/pdb_ldap.c:5087:16: warning: variable ‘id’ set but not used [-Wunused-but-set-variable]
> It looks that if the "id" variable can be removed in both
> cases. Do you want me to do this, or do you want to send a
> new patch?

Thanks, for the quick review.
And I'm adding a mental note to check for compiler warnings.
I've removed the unused variable and updated the patch.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-s3-Always-cache-idmapping-results-of-pdb-backend.patch
Type: text/x-patch
Size: 3609 bytes
Desc: not available
URL: <http://lists.samba.org/pipermail/samba-technical/attachments/20140430/61e0cb46/attachment.bin>

More information about the samba-technical mailing list