summaryrefslogtreecommitdiffstats
path: root/source
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-02-03 19:24:52 +0000
committerVolker Lendecke <vlendec@samba.org>2006-02-03 19:24:52 +0000
commitf8c735fe578f07b0b663a4f7e79e6f61bca211c0 (patch)
tree3a04ffdbd97ddb1ac3cba20e9d80d8cecc472f93 /source
parent835f018ef2901439e738a83ac5c233c767ff20ca (diff)
downloadsamba-f8c735fe578f07b0b663a4f7e79e6f61bca211c0.tar.gz
samba-f8c735fe578f07b0b663a4f7e79e6f61bca211c0.tar.xz
samba-f8c735fe578f07b0b663a4f7e79e6f61bca211c0.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
Diffstat (limited to 'source')
-rw-r--r--source/nsswitch/winbindd_cache.c4
1 files changed, 3 insertions, 1 deletions
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) ));