Skip to content

Commit be922e8

Browse files
committed
Rename the new MAX_AUTH_TOKEN_LENGTH #define to PG_MAX_AUTH_MAX_TOKEN_LENGTH,
to make it more obvious that it's a PostgreSQL internal limit, not something that comes from system header files.
1 parent de7ee9e commit be922e8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/backend/libpq/auth.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.185 2009/10/14 07:27:13 heikki Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.186 2009/10/14 22:09:46 heikki Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -184,7 +184,7 @@ static int pg_SSPI_recvauth(Port *port);
184184

185185

186186
/*
187-
* Maximum size of GSS and SSPI authentication tokens.
187+
* Maximum accepted size of GSS and SSPI authentication tokens.
188188
*
189189
* Kerberos tickets are usually quite small, but the TGTs issued by Windows
190190
* domain controllers include an authorization field known as the Privilege
@@ -196,7 +196,7 @@ static int pg_SSPI_recvauth(Port *port);
196196
* registry setting. Microsoft recommends that it is not set higher than
197197
* 65535 bytes, so that seems like a reasonable limit for us as well.
198198
*/
199-
#define MAX_AUTH_TOKEN_LENGTH 65535
199+
#define PG_MAX_AUTH_TOKEN_LENGTH 65535
200200

201201

202202
/*----------------------------------------------------------------
@@ -963,7 +963,7 @@ pg_GSS_recvauth(Port *port)
963963

964964
/* Get the actual GSS token */
965965
initStringInfo(&buf);
966-
if (pq_getmessage(&buf, MAX_AUTH_TOKEN_LENGTH))
966+
if (pq_getmessage(&buf, PG_MAX_AUTH_TOKEN_LENGTH))
967967
{
968968
/* EOF - pq_getmessage already logged error */
969969
pfree(buf.data);
@@ -1201,7 +1201,7 @@ pg_SSPI_recvauth(Port *port)
12011201

12021202
/* Get the actual SSPI token */
12031203
initStringInfo(&buf);
1204-
if (pq_getmessage(&buf, MAX_AUTH_TOKEN_LENGTH))
1204+
if (pq_getmessage(&buf, PG_MAX_AUTH_TOKEN_LENGTH))
12051205
{
12061206
/* EOF - pq_getmessage already logged error */
12071207
pfree(buf.data);

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