s3:smbd: also fill the memcache with sid<->id mappings in ldapsam_sid_to_id()
authorMichael Adam <obnox@samba.org>
Fri, 13 Nov 2009 15:16:50 +0000 (16:16 +0100)
committerKarolin Seeger <kseeger@samba.org>
Thu, 11 Feb 2010 11:02:46 +0000 (12:02 +0100)
not only the persistent idmap cache.

Michael
(cherry picked from commit ee2565bd461ccfb916c5290c883e5ced3af72141)

Signed-off-by: Stefan Metzmacher <metze@samba.org>
source3/passdb/pdb_ldap.c

index c8971870155ed01ddcfe9f194f0551a9806349cd..40225555d7bf8048351afdb455469e4d399857e0 100644 (file)
@@ -4944,6 +4944,7 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods,
 
                id->gid = strtoul(gid_str, NULL, 10);
                *type = (enum lsa_SidType)strtoul(value, NULL, 10);
+               store_gid_sid_cache(sid, id->gid);
                idmap_cache_set_sid2gid(sid, id->gid);
                ret = True;
                goto done;
@@ -4961,6 +4962,7 @@ static bool ldapsam_sid_to_id(struct pdb_methods *methods,
 
        id->uid = strtoul(value, NULL, 10);
        *type = SID_NAME_USER;
+       store_uid_sid_cache(sid, id->uid);
        idmap_cache_set_sid2uid(sid, id->uid);
 
        ret = True;