diff options
author | Nathan Bossart <nathan@postgresql.org> | 2024-06-26 11:25:38 -0500 |
---|---|---|
committer | Nathan Bossart <nathan@postgresql.org> | 2024-06-26 11:25:38 -0500 |
commit | 32f07991b728c25bcd2543ef22ec96105e558477 (patch) | |
tree | 241aa8c9cc566554870776343c1bd028dc2b365b /src/interfaces/libpq/fe-auth.c | |
parent | 486c2ea25c5e7e248c31b2dbb5db8ebcd3c7d813 (diff) | |
download | postgresql-32f07991b728c25bcd2543ef22ec96105e558477.tar.gz postgresql-32f07991b728c25bcd2543ef22ec96105e558477.zip |
Use PqMsg_* macros in fe-auth.c.
Commit f4b54e1ed9, which introduced macros for protocol characters,
missed updating a few places in fe-auth.c.
Author: Jelte Fennema-Nio
Discussion: https://postgr.es/m/CAGECzQSoPHtZ4xe0raJ6FYSEiPPS%2BYWXBhOGo%2BY1YecLgknF3g%40mail.gmail.com
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
-rw-r--r-- | src/interfaces/libpq/fe-auth.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index 256f596e6bb..3b25d8afda4 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -124,7 +124,7 @@ pg_GSS_continue(PGconn *conn, int payloadlen) * first or subsequent packet, just send the same kind of password * packet. */ - if (pqPacketSend(conn, 'p', + if (pqPacketSend(conn, PqMsg_GSSResponse, goutbuf.value, goutbuf.length) != STATUS_OK) { gss_release_buffer(&lmin_s, &goutbuf); @@ -324,7 +324,7 @@ pg_SSPI_continue(PGconn *conn, int payloadlen) */ if (outbuf.pBuffers[0].cbBuffer > 0) { - if (pqPacketSend(conn, 'p', + if (pqPacketSend(conn, PqMsg_GSSResponse, outbuf.pBuffers[0].pvBuffer, outbuf.pBuffers[0].cbBuffer)) { FreeContextBuffer(outbuf.pBuffers[0].pvBuffer); @@ -683,7 +683,7 @@ pg_SASL_continue(PGconn *conn, int payloadlen, bool final) /* * Send the SASL response to the server. */ - res = pqPacketSend(conn, 'p', output, outputlen); + res = pqPacketSend(conn, PqMsg_SASLResponse, output, outputlen); free(output); if (res != STATUS_OK) @@ -754,7 +754,8 @@ pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq) default: return STATUS_ERROR; } - ret = pqPacketSend(conn, 'p', pwd_to_send, strlen(pwd_to_send) + 1); + ret = pqPacketSend(conn, PqMsg_PasswordMessage, + pwd_to_send, strlen(pwd_to_send) + 1); free(crypt_pwd); return ret; } |