This corrects messages for can't-happen errors. The corresponding "user
token" appears in the HANDLE argument of GetTokenInformation().
if (!GetTokenInformation(token, TokenUser, tokenuser, retlen, &retlen))
ereport(ERROR,
- (errmsg_internal("could not get user token: error code %lu",
+ (errmsg_internal("could not get token user: error code %lu",
GetLastError())));
CloseHandle(token);
goto cleanup;
}
- /*
- * Get the user token for the current user, which provides us with the SID
- * that is needed for creating the ACL.
- */
+ /* Get the current user SID */
if (!GetTokenUser(hToken, &pTokenUser))
{
- log_error("could not get user token: error code %lu", GetLastError());
+ log_error("could not get token user: error code %lu", GetLastError());
goto cleanup;
}