Author: gd Date: 2006-09-14 10:08:36 +0000 (Thu, 14 Sep 2006) New Revision: 18510
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=18510 Log: Protect against storing null-sids in the winbind cache. Guenther Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-09-14 09:58:20 UTC (rev 18509) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-09-14 10:08:36 UTC (rev 18510) @@ -788,6 +788,10 @@ struct cache_entry *centry; fstring sid_string; + if (is_null_sid(&sid)) { + return; + } + centry = centry_start(domain, status); if (!centry) return; @@ -807,6 +811,10 @@ struct cache_entry *centry; fstring sid_string; + if (is_null_sid(&info->user_sid)) { + return; + } + centry = centry_start(domain, status); if (!centry) return; Modified: branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c =================================================================== --- branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c 2006-09-14 09:58:20 UTC (rev 18509) +++ branches/SAMBA_3_0_23/source/nsswitch/winbindd_cache.c 2006-09-14 10:08:36 UTC (rev 18510) @@ -771,6 +771,10 @@ struct cache_entry *centry; fstring sid_string; + if (is_null_sid(&sid)) { + return; + } + centry = centry_start(domain, status); if (!centry) return; @@ -790,6 +794,10 @@ struct cache_entry *centry; fstring sid_string; + if (is_null_sid(&info->user_sid)) { + return; + } + centry = centry_start(domain, status); if (!centry) return;