From b2c0260219c400b1b219333d7b18d9ed81e1ffe4 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Thu, 14 Sep 2006 10:08:36 +0000 Subject: r18510: Protect against storing null-sids in the winbind cache. Guenther (This used to be commit b04c8d46efc67e013b976e0ba1be558b70a1f899) --- source3/nsswitch/winbindd_cache.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'source3') diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index ac3b2661f0..09b10f27f8 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -788,6 +788,10 @@ static void wcache_save_sid_to_name(struct winbindd_domain *domain, NTSTATUS sta 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 @@ static void wcache_save_user(struct winbindd_domain *domain, NTSTATUS status, WI struct cache_entry *centry; fstring sid_string; + if (is_null_sid(&info->user_sid)) { + return; + } + centry = centry_start(domain, status); if (!centry) return; -- cgit