Commit c22650cd authored by Noah Misch's avatar Noah Misch

Refer to a TOKEN_USER payload as a "token user," not as a "user token".

This corrects messages for can't-happen errors.  The corresponding "user
token" appears in the HANDLE argument of GetTokenInformation().
parent 4ad6f135
...@@ -1252,7 +1252,7 @@ pg_SSPI_recvauth(Port *port) ...@@ -1252,7 +1252,7 @@ pg_SSPI_recvauth(Port *port)
if (!GetTokenInformation(token, TokenUser, tokenuser, retlen, &retlen)) if (!GetTokenInformation(token, TokenUser, tokenuser, retlen, &retlen))
ereport(ERROR, ereport(ERROR,
(errmsg_internal("could not get user token: error code %lu", (errmsg_internal("could not get token user: error code %lu",
GetLastError()))); GetLastError())));
CloseHandle(token); CloseHandle(token);
......
...@@ -672,13 +672,10 @@ AddUserToTokenDacl(HANDLE hToken) ...@@ -672,13 +672,10 @@ AddUserToTokenDacl(HANDLE hToken)
goto cleanup; goto cleanup;
} }
/* /* Get the current user SID */
* Get the user token for the current user, which provides us with the SID
* that is needed for creating the ACL.
*/
if (!GetTokenUser(hToken, &pTokenUser)) 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; goto cleanup;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment