winbind: Use domain name from lsa query for sid_to_name cache entry
authorChristof Schmitt <cs@samba.org>
Mon, 11 Mar 2019 23:14:02 +0000 (16:14 -0700)
committerChristof Schmitt <cs@samba.org>
Thu, 18 Apr 2019 17:21:18 +0000 (17:21 +0000)
commitaec9bda25f10ca2710d91fb680cca7904e92f9de
tree42ffc5157c1da753670c26d99aa45d78fe9db535
parent640e0ef4fd338ddf03b813a8d45cce67c7ec7a01
winbind: Use domain name from lsa query for sid_to_name cache entry

When winbindd is asked to map a name like realm.com\name to a SID ,that
is sucessfully resolved through the lsa lookup name call. The same call
also returns the short domain name (netbios name of the domain). Use
that short domain name for the sid_to_name cache entry, so that
subsequent sid_to_name queries return the expected netbiosname\name
result and not realm.com\name.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=13831

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
selftest/knownfail
source3/winbindd/winbindd_cache.c