summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2008-07-11 17:43:25 +0200
committerVolker Lendecke <vl@samba.org>2008-07-11 17:53:24 +0200
commitebb9437f4f1bc91da53919ddc6f4c33ecac09b8e (patch)
tree6972740a93b58171937b0af5efef5350de15c2a6 /source3/winbindd
parent50a84acc40cf83accdcdb03bc34836dddb4e0c1a (diff)
downloadsamba-ebb9437f4f1bc91da53919ddc6f4c33ecac09b8e.tar.gz
samba-ebb9437f4f1bc91da53919ddc6f4c33ecac09b8e.tar.bz2
samba-ebb9437f4f1bc91da53919ddc6f4c33ecac09b8e.zip
Revert "Simplify idmap_cache_set() a bit"
This reverts commit 55b976ba93462c6885e8d89edd13c32fb5529944. (This used to be commit 23edc4ec0ab1de60a864de01c0ff90ea1378231d)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/idmap_cache.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/source3/winbindd/idmap_cache.c b/source3/winbindd/idmap_cache.c
index eaff30c4e1..0b3c22eb20 100644
--- a/source3/winbindd/idmap_cache.c
+++ b/source3/winbindd/idmap_cache.c
@@ -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;
}