mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-02-21 00:07:36 +08:00
When looking up valid accounts by name, LookupAccountName returns a SID and a case-correct domain name. However, the name was input and LookupAccountName is case-insensitive, so the name is not necessarily written the same way as in SAM or AD. Fix that by doing a reverse lookup on the just fetched SID. This fetches the account name in the correct case. Override the incoming name with the case correct name from LookupAccountSid. Signed-off-by: Corinna Vinschen <corinna@vinschen.de>