s3:winbind correct a copy&paste error
authorChristian Ambach <christian.ambach@de.ibm.com>
Wed, 24 Nov 2010 10:57:59 +0000 (11:57 +0100)
committerVolker Lendecke <vl@samba.org>
Wed, 24 Nov 2010 15:18:45 +0000 (08:18 -0700)
negative results of sid->gid lookups should be stored with
idmap_cache_set_sid2gid instead of idmap_cache_set_sid2uid

This seems to be a copy&paste error when similar logic from the
sid2uid path was copied here in 84b88f4b.

source3/winbindd/idmap_util.c

index 950233eeb66971bc9a7a16527be96298cb28cd52..3bc345fd2efbbfefc1b778da0fc37b7a2606107e 100644 (file)
@@ -129,7 +129,7 @@ backend:
                if (winbindd_use_idmap_cache()) {
                        struct dom_sid null_sid;
                        ZERO_STRUCT(null_sid);
-                       idmap_cache_set_sid2uid(&null_sid, gid);
+                       idmap_cache_set_sid2gid(&null_sid, gid);
                }
                DEBUG(10, ("gid [%lu] not mapped\n", (unsigned long)gid));
                return NT_STATUS_NONE_MAPPED;
@@ -255,7 +255,7 @@ backend:
                DEBUG(10, ("idmap_backends_sid_to_unixid failed: %s\n",
                           nt_errstr(ret)));
                if (winbindd_use_idmap_cache()) {
-                       idmap_cache_set_sid2uid(sid, -1);
+                       idmap_cache_set_sid2gid(sid, -1);
                }
                return ret;
        }
@@ -263,7 +263,7 @@ backend:
        if (map.status != ID_MAPPED) {
                DEBUG(10, ("sid [%s] is not mapped\n", sid_string_dbg(sid)));
                if (winbindd_use_idmap_cache()) {
-                       idmap_cache_set_sid2uid(sid, -1);
+                       idmap_cache_set_sid2gid(sid, -1);
                }
                return NT_STATUS_NONE_MAPPED;
        }