s3:passdb: fix bug #6509: use gid (not uid) cache in fetch_gid_from_cache().
authorMichael Adam <obnox@samba.org>
Fri, 26 Jun 2009 12:09:10 +0000 (14:09 +0200)
committerKarolin Seeger <kseeger@samba.org>
Sat, 27 Jun 2009 09:19:20 +0000 (11:19 +0200)
With the previous code, the cache can never have been hit at all.

Michael
(cherry picked from commit a4bc5bfa95be242fe1c8e0cd520a8f1e3d2a67f5)
(cherry picked from commit 410fa8258169bc9b4a61164cd893746d3e6abfae)

source3/passdb/lookup_sid.c

index 3a03cfe081d965c871cb1c5eb3199358c17e0f3a..112225d5049de49d74cb2ff5383f5048cc58bbda 100644 (file)
@@ -1085,7 +1085,7 @@ static bool fetch_gid_from_cache(gid_t *pgid, const DOM_SID *psid)
 {
        DATA_BLOB cache_value;
 
-       if (!memcache_lookup(NULL, SID_UID_CACHE,
+       if (!memcache_lookup(NULL, SID_GID_CACHE,
                             data_blob_const(psid, ndr_size_dom_sid(psid, NULL, 0)),
                             &cache_value)) {
                return false;