Skip to content

Commit 32f0799

Browse files
Use PqMsg_* macros in fe-auth.c.
Commit f4b54e1, 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
1 parent 486c2ea commit 32f0799

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/interfaces/libpq/fe-auth.c

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,7 @@ pg_GSS_continue(PGconn *conn, int payloadlen)
124124
* first or subsequent packet, just send the same kind of password
125125
* packet.
126126
*/
127-
if (pqPacketSend(conn, 'p',
127+
if (pqPacketSend(conn, PqMsg_GSSResponse,
128128
goutbuf.value, goutbuf.length) != STATUS_OK)
129129
{
130130
gss_release_buffer(&lmin_s, &goutbuf);
@@ -324,7 +324,7 @@ pg_SSPI_continue(PGconn *conn, int payloadlen)
324324
*/
325325
if (outbuf.pBuffers[0].cbBuffer > 0)
326326
{
327-
if (pqPacketSend(conn, 'p',
327+
if (pqPacketSend(conn, PqMsg_GSSResponse,
328328
outbuf.pBuffers[0].pvBuffer, outbuf.pBuffers[0].cbBuffer))
329329
{
330330
FreeContextBuffer(outbuf.pBuffers[0].pvBuffer);
@@ -683,7 +683,7 @@ pg_SASL_continue(PGconn *conn, int payloadlen, bool final)
683683
/*
684684
* Send the SASL response to the server.
685685
*/
686-
res = pqPacketSend(conn, 'p', output, outputlen);
686+
res = pqPacketSend(conn, PqMsg_SASLResponse, output, outputlen);
687687
free(output);
688688

689689
if (res != STATUS_OK)
@@ -754,7 +754,8 @@ pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq)
754754
default:
755755
return STATUS_ERROR;
756756
}
757-
ret = pqPacketSend(conn, 'p', pwd_to_send, strlen(pwd_to_send) + 1);
757+
ret = pqPacketSend(conn, PqMsg_PasswordMessage,
758+
pwd_to_send, strlen(pwd_to_send) + 1);
758759
free(crypt_pwd);
759760
return ret;
760761
}

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