Skip to content

Commit c22650c

Browse files
committed
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().
1 parent 4ad6f13 commit c22650c

File tree

2 files changed

+3
-6
lines changed

2 files changed

+3
-6
lines changed

src/backend/libpq/auth.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1252,7 +1252,7 @@ pg_SSPI_recvauth(Port *port)
12521252

12531253
if (!GetTokenInformation(token, TokenUser, tokenuser, retlen, &retlen))
12541254
ereport(ERROR,
1255-
(errmsg_internal("could not get user token: error code %lu",
1255+
(errmsg_internal("could not get token user: error code %lu",
12561256
GetLastError())));
12571257

12581258
CloseHandle(token);

src/common/exec.c

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -672,13 +672,10 @@ AddUserToTokenDacl(HANDLE hToken)
672672
goto cleanup;
673673
}
674674

675-
/*
676-
* Get the user token for the current user, which provides us with the SID
677-
* that is needed for creating the ACL.
678-
*/
675+
/* Get the current user SID */
679676
if (!GetTokenUser(hToken, &pTokenUser))
680677
{
681-
log_error("could not get user token: error code %lu", GetLastError());
678+
log_error("could not get token user: error code %lu", GetLastError());
682679
goto cleanup;
683680
}
684681

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy