summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-02-03 19:24:52 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:23 -0500
commit989c9311c5c155a8bea2b7921edf5eeb36c54ead (patch)
treef14653a43b71c38509db80440a859138b132c5ab /source3/nsswitch
parentca2cd33a69bd16f6c9525863b6f8e7a6ebf45b66 (diff)
downloadsamba-989c9311c5c155a8bea2b7921edf5eeb36c54ead.tar.gz
samba-989c9311c5c155a8bea2b7921edf5eeb36c54ead.tar.bz2
samba-989c9311c5c155a8bea2b7921edf5eeb36c54ead.zip
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)
Diffstat (limited to 'source3/nsswitch')
-rw-r--r--source3/nsswitch/winbindd_cache.c4
1 files changed, 3 insertions, 1 deletions
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) ));