From d62da3e9875592af91469bf75ca32be77a40ea59 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Feb 2006 19:24:52 +0000 Subject: [PATCH] r13309: If the sid in the winbind name2sid cache is not valid (NT_STATUS_NONE_MAPPED), we have S-0-0 as a SID in the cache. This leads to ugly level 0 messages from string_to_sid. Avoid them. Volker --- source/nsswitch/winbindd_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/source/nsswitch/winbindd_cache.c b/source/nsswitch/winbindd_cache.c index 1d047b8356f..9ecfb1ff6ed 100644 --- a/source/nsswitch/winbindd_cache.c +++ b/source/nsswitch/winbindd_cache.c @@ -960,8 +960,10 @@ static NTSTATUS name_to_sid(struct winbindd_domain *domain, if (!centry) goto do_query; *type = (enum SID_NAME_USE)centry_uint32(centry); - centry_sid(centry, sid); status = centry->status; + if (NT_STATUS_IS_OK(status)) { + centry_sid(centry, sid); + } DEBUG(10,("name_to_sid: [Cached] - cached name for domain %s status %s\n", domain->name, get_friendly_nt_error_msg(status) ));