]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
Revert "Simplify idmap_cache_set() a bit"
authorVolker Lendecke <vl@samba.org>
Fri, 11 Jul 2008 15:43:25 +0000 (17:43 +0200)
committerVolker Lendecke <vl@samba.org>
Fri, 11 Jul 2008 15:53:24 +0000 (17:53 +0200)
This reverts commit 55b976ba93462c6885e8d89edd13c32fb5529944.

source/winbindd/idmap_cache.c

index eaff30c4e112fb0ed41d90f723ee796c5116492d..0b3c22eb20de8e12ed0436bb659a691d24e0845f 100644 (file)
@@ -95,9 +95,14 @@ NTSTATUS idmap_cache_set(struct idmap_cache_ctx *cache, const struct id_map *id)
        char *valstr;
 
        /* Don't cache lookups in the S-1-22-{1,2} domain */
-
-       if (sid_check_is_in_unix_users(id->sid)
-           || sid_check_is_in_unix_groups(id->sid)) {
+       if ( (id->xid.type == ID_TYPE_UID) && 
+            sid_check_is_in_unix_users(id->sid) )
+       {
+               return NT_STATUS_OK;
+       }
+       if ( (id->xid.type == ID_TYPE_GID) && 
+            sid_check_is_in_unix_groups(id->sid) )
+       {
                return NT_STATUS_OK;
        }