| 194 | */ |
| 195 | |
| 196 | static void |
| 197 | pg_SSPI_error(PGconn *conn, const char *mprefix, SECURITY_STATUS r) |
| 198 | { |
| 199 | char sysmsg[256]; |
| 200 | |
| 201 | if (FormatMessage(FORMAT_MESSAGE_IGNORE_INSERTS | |
| 202 | FORMAT_MESSAGE_FROM_SYSTEM, |
| 203 | NULL, r, 0, |
| 204 | sysmsg, sizeof(sysmsg), NULL) == 0) |
| 205 | appendPQExpBuffer(&conn->errorMessage, "%s: SSPI error %x\n", |
| 206 | mprefix, (unsigned int) r); |
| 207 | else |
| 208 | appendPQExpBuffer(&conn->errorMessage, "%s: %s (%x)\n", |
| 209 | mprefix, sysmsg, (unsigned int) r); |
| 210 | } |
| 211 | |
| 212 | /* |
| 213 | * Continue SSPI authentication with next token as needed. |
no test coverage detected