From 1e9d8d485791282f860a0a3c46234c128b84b3a0 Mon Sep 17 00:00:00 2001 From: Günther Deschner Date: Mon, 9 Jan 2006 12:59:41 +0000 Subject: r12788: Since we have agreed on the case of winbindd names, we can store a sid_to_name lookup result already after doing a sucessfull name_to_sid lookup. Guenther (This used to be commit 2456832a6d9ad2590dc02e147cc2c2e87d5a3a7a) --- source3/nsswitch/winbindd_cache.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source3/nsswitch/winbindd_cache.c') diff --git a/source3/nsswitch/winbindd_cache.c b/source3/nsswitch/winbindd_cache.c index 81dd85e588..1d047b8356 100644 --- a/source3/nsswitch/winbindd_cache.c +++ b/source3/nsswitch/winbindd_cache.c @@ -991,8 +991,11 @@ do_query: /* and save it */ 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 */ + if (NT_STATUS_IS_OK(status)) { + strupper_m(CONST_DISCARD(char *,domain_name)); + strlower_m(CONST_DISCARD(char *,name)); + wcache_save_sid_to_name(domain, status, sid, domain_name, name, *type); + } return status; } -- cgit