summaryrefslogtreecommitdiff
path: root/source3/nsswitch
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2006-01-06 14:55:26 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:06:02 -0500
commit850b7c4e87fe50beb785e95241d592065f616826 (patch)
tree1f18a848c4da90ccb1008662d1459900f3e1b4b0 /source3/nsswitch
parent4d1d826be44ec82e3778e89cbd2873e0aacfc134 (diff)
downloadsamba-850b7c4e87fe50beb785e95241d592065f616826.tar.gz
samba-850b7c4e87fe50beb785e95241d592065f616826.tar.bz2
samba-850b7c4e87fe50beb785e95241d592065f616826.zip
r12742: Don't write null sid mappings into the winbindd_cache.tdb.
Guenther (This used to be commit 1e0124efc54810125bbfae6dce536b2c4fff62c1)
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 81dd85e588..eea0d16ca8 100644
--- a/source3/nsswitch/winbindd_cache.c
+++ b/source3/nsswitch/winbindd_cache.c
@@ -989,7 +989,9 @@ do_query:
status = domain->backend->name_to_sid(domain, mem_ctx, domain_name, name, sid, type);
/* and save it */
- wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type);
+ if (NT_STATUS_IS_OK(status)) {
+ wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type);
+ }
/* We can't save the sid to name mapping as we don't know the
correct case of the name without looking it up */