* Fetch all errors of a specific type and append to "str". * Each error string is preceded by a space. */
| 30 | * Each error string is preceded by a space. |
| 31 | */ |
| 32 | static void |
| 33 | pg_GSS_error_int(PQExpBuffer str, OM_uint32 stat, int type) |
| 34 | { |
| 35 | OM_uint32 lmin_s; |
| 36 | gss_buffer_desc lmsg; |
| 37 | OM_uint32 msg_ctx = 0; |
| 38 | |
| 39 | do |
| 40 | { |
| 41 | if (gss_display_status(&lmin_s, stat, type, GSS_C_NO_OID, |
| 42 | &msg_ctx, &lmsg) != GSS_S_COMPLETE) |
| 43 | break; |
| 44 | appendPQExpBufferChar(str, ' '); |
| 45 | appendBinaryPQExpBuffer(str, lmsg.value, lmsg.length); |
| 46 | gss_release_buffer(&lmin_s, &lmsg); |
| 47 | } while (msg_ctx); |
| 48 | } |
| 49 | |
| 50 | /* |
| 51 | * GSSAPI errors contain two parts; put both into conn->errorMessage. |
no test coverage detected