Author: gd Date: 2006-01-09 12:59:41 +0000 (Mon, 09 Jan 2006) New Revision: 12788
WebSVN: http://websvn.samba.org/cgi-bin/viewcvs.cgi?view=rev&root=samba&rev=12788 Log: 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 Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c trunk/source/nsswitch/winbindd_cache.c Changeset: Modified: branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c =================================================================== --- branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-01-09 12:51:57 UTC (rev 12787) +++ branches/SAMBA_3_0/source/nsswitch/winbindd_cache.c 2006-01-09 12:59:41 UTC (rev 12788) @@ -991,8 +991,11 @@ /* 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; } Modified: trunk/source/nsswitch/winbindd_cache.c =================================================================== --- trunk/source/nsswitch/winbindd_cache.c 2006-01-09 12:51:57 UTC (rev 12787) +++ trunk/source/nsswitch/winbindd_cache.c 2006-01-09 12:59:41 UTC (rev 12788) @@ -1206,8 +1206,11 @@ /* 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; }
