s3: shortcut gid_to_sid when "ldapsam:trusted = yes"
authorStefan Metzmacher <metze@samba.org>
Sat, 30 Jan 2010 21:28:19 +0000 (22:28 +0100)
committerStefan Metzmacher <metze@samba.org>
Mon, 8 Feb 2010 10:23:17 +0000 (11:23 +0100)
commit779821df8ecfe3ed2392582b500d26332f0b80fc
treebb1d4583c181337a43e8623cc066fd993a2c095f
parent4a4b2a5eafe89e87798d231522c756750d14ce60
s3: shortcut gid_to_sid when "ldapsam:trusted = yes"

The normal gid_to_sid behaviour is to call sys_getgrgid()
to get the name for the given gid and then call the
getsamgrnam passdb method for the resulting name.

In the ldapsam:trusted case we can reduce the gid_to_sid
operation to one simple search for the gidNumber attribute
and only get the sambaSID attribute from the correspoinding
LDAP object. This reduces the number of ldap roundtrips
for this operation.

metze
source3/passdb/pdb_ldap.c