summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2007-04-06 21:05:55 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:19:13 -0500
commitccb99cafa7c806906d1f35f9ee3dcd4e15e69204 (patch)
treefda91dda59641d4e46531169db286a1d0b7914e0 /source3
parentca70c3cde7b2068f7665a4bf11359c10e75bc85a (diff)
downloadsamba-ccb99cafa7c806906d1f35f9ee3dcd4e15e69204.tar.gz
samba-ccb99cafa7c806906d1f35f9ee3dcd4e15e69204.tar.bz2
samba-ccb99cafa7c806906d1f35f9ee3dcd4e15e69204.zip
r22110: don't cache the S-1-22-{1,2} domain SID/uig/gid lookups in idmap_cache
(This used to be commit adfc2d31656f642c76a3d8eeddf5a67804a4917d)
Diffstat (limited to 'source3')
-rw-r--r--source3/nsswitch/idmap_cache.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/source3/nsswitch/idmap_cache.c b/source3/nsswitch/idmap_cache.c
index 6d23e75b2c..6e5febf2ba 100644
--- a/source3/nsswitch/idmap_cache.c
+++ b/source3/nsswitch/idmap_cache.c
@@ -109,6 +109,19 @@ NTSTATUS idmap_cache_set(struct idmap_cache_ctx *cache, const struct id_map *id)
char *idkey;
char *valstr;
+ /* Don't cache lookups in the S-1-22-{1,2} domain */
+ 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;
+ }
+
+
ret = idmap_cache_build_sidkey(cache, &sidkey, id);
if (!NT_STATUS_IS_OK(ret)) return ret;