summaryrefslogtreecommitdiff
path: root/source3/winbindd
diff options
context:
space:
mode:
authorKarolin Seeger <kseeger@samba.org>2008-07-01 10:34:22 +0200
committerKarolin Seeger <kseeger@samba.org>2008-07-01 10:34:22 +0200
commit3b1de7f7f4db16c50a2c6b310d04643c094be695 (patch)
tree294798157cc3f158886a2a3af9a7956781afacc3 /source3/winbindd
parent9b0e3bb0c36abd9396f07de988e5c402d8503681 (diff)
downloadsamba-3b1de7f7f4db16c50a2c6b310d04643c094be695.tar.gz
samba-3b1de7f7f4db16c50a2c6b310d04643c094be695.tar.bz2
samba-3b1de7f7f4db16c50a2c6b310d04643c094be695.zip
Revert "winbind cache: Don't create SN cache entries during name-to-sid queries."
This reverts commit b58e4f6b3d73294d8448c0dff4341183c52e5b7c. Details can be found on the samba-technical mailing list. Karolin (This used to be commit 534a445df450c681be7da2c9dd65f7294f942b08)
Diffstat (limited to 'source3/winbindd')
-rw-r--r--source3/winbindd/winbindd_cache.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source3/winbindd/winbindd_cache.c b/source3/winbindd/winbindd_cache.c
index 03512b9745..60403717c1 100644
--- a/source3/winbindd/winbindd_cache.c
+++ b/source3/winbindd/winbindd_cache.c
@@ -1451,13 +1451,13 @@ do_query:
if (domain->online &&
(NT_STATUS_IS_OK(status) || NT_STATUS_EQUAL(status, NT_STATUS_NONE_MAPPED))) {
wcache_save_name_to_sid(domain, status, domain_name, name, sid, *type);
-
- /* Don't add SN cache entries for sid-to-name queries during this operation.
- * It leads to inconsistent answers during sid-to-name queries as the
- * client can ask for different combinations of lower case and upper case
- * names in these name-to-sid queries.
- */
+ /* Only save the reverse mapping if this was not a UPN */
+ if (!strchr(name, '@')) {
+ 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;