svn commit: samba r22110 - in branches: SAMBA_3_0/source/nsswitch
SAMBA_3_0_25/source/nsswitch
jerry at samba.org
jerry at samba.org
Fri Apr 6 21:05:55 GMT 2007
Author: jerry
Date: 2007-04-06 21:05:55 +0000 (Fri, 06 Apr 2007)
New Revision: 22110
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=22110
Log:
don't cache the S-1-22-{1,2} domain SID/uig/gid lookups in idmap_cache
Modified:
branches/SAMBA_3_0/source/nsswitch/idmap_cache.c
branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c
Changeset:
Modified: branches/SAMBA_3_0/source/nsswitch/idmap_cache.c
===================================================================
--- branches/SAMBA_3_0/source/nsswitch/idmap_cache.c 2007-04-06 19:55:45 UTC (rev 22109)
+++ branches/SAMBA_3_0/source/nsswitch/idmap_cache.c 2007-04-06 21:05:55 UTC (rev 22110)
@@ -109,6 +109,19 @@
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;
Modified: branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c
===================================================================
--- branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c 2007-04-06 19:55:45 UTC (rev 22109)
+++ branches/SAMBA_3_0_25/source/nsswitch/idmap_cache.c 2007-04-06 21:05:55 UTC (rev 22110)
@@ -109,6 +109,19 @@
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;
More information about the samba-cvs
mailing list