From 989c9311c5c155a8bea2b7921edf5eeb36c54ead Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Fri, 3 Feb 2006 19:24:52 +0000 Subject: 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 (This used to be commit d62da3e9875592af91469bf75ca32be77a40ea59) --- source3/nsswitch/winbindd_cache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'source3/nsswitch') diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 1d047b8356..9ecfb1ff6e 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/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) )); -- cgit