Refer to a TOKEN_USER payload as a "token user," not as a "user token".
authorNoah Misch <[email protected]>
Sat, 2 Apr 2016 01:53:18 +0000 (21:53 -0400)
committerNoah Misch <[email protected]>
Sat, 2 Apr 2016 01:53:18 +0000 (21:53 -0400)
This corrects messages for can't-happen errors.  The corresponding "user
token" appears in the HANDLE argument of GetTokenInformation().

src/backend/libpq/auth.c
src/common/exec.c

index 899da712f7ad7ab609a4298460f0e0d8a8a50467..2751183c3e694dac307344ed08e6c75682b1bdd2 100644 (file)
@@ -1252,7 +1252,7 @@ pg_SSPI_recvauth(Port *port)
 
    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);
index 927d03c3b7594badfafad7cc41a8a7666f46e2cd..ec8c655636540ad412fceb10c0e7d2ceae8e916a 100644 (file)
@@ -672,13 +672,10 @@ AddUserToTokenDacl(HANDLE hToken)
        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;
    }