https://fedorahosted.org/389/ticket/47353
https://fedorahosted.org/389/attachment/ticket/47353/0001-Ticket-47353-Pa...
Bug description: The result of opening the changelog file
"passhook.dat" was checked by errno (_get_errno(&errno)),
which was not updated once an error (ENOENT) was set
although the other error returned from GetLastError.
Fix description: This patch replaces _get_errno with
GetLastError to get the correct error.
In addition, debug logging code is added.