mirror of
https://github.com/postgres/postgres.git
synced 2025-04-22 23:02:54 +03:00
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.
This commit is contained in:
parent
de7ee9e2e9
commit
be922e8555
@ -8,7 +8,7 @@
|
|||||||
*
|
*
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.185 2009/10/14 07:27:13 heikki Exp $
|
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.186 2009/10/14 22:09:46 heikki Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -184,7 +184,7 @@ static int pg_SSPI_recvauth(Port *port);
|
|||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Maximum size of GSS and SSPI authentication tokens.
|
* Maximum accepted size of GSS and SSPI authentication tokens.
|
||||||
*
|
*
|
||||||
* Kerberos tickets are usually quite small, but the TGTs issued by Windows
|
* Kerberos tickets are usually quite small, but the TGTs issued by Windows
|
||||||
* domain controllers include an authorization field known as the Privilege
|
* domain controllers include an authorization field known as the Privilege
|
||||||
@ -196,7 +196,7 @@ static int pg_SSPI_recvauth(Port *port);
|
|||||||
* registry setting. Microsoft recommends that it is not set higher than
|
* registry setting. Microsoft recommends that it is not set higher than
|
||||||
* 65535 bytes, so that seems like a reasonable limit for us as well.
|
* 65535 bytes, so that seems like a reasonable limit for us as well.
|
||||||
*/
|
*/
|
||||||
#define MAX_AUTH_TOKEN_LENGTH 65535
|
#define PG_MAX_AUTH_TOKEN_LENGTH 65535
|
||||||
|
|
||||||
|
|
||||||
/*----------------------------------------------------------------
|
/*----------------------------------------------------------------
|
||||||
@ -963,7 +963,7 @@ pg_GSS_recvauth(Port *port)
|
|||||||
|
|
||||||
/* Get the actual GSS token */
|
/* Get the actual GSS token */
|
||||||
initStringInfo(&buf);
|
initStringInfo(&buf);
|
||||||
if (pq_getmessage(&buf, MAX_AUTH_TOKEN_LENGTH))
|
if (pq_getmessage(&buf, PG_MAX_AUTH_TOKEN_LENGTH))
|
||||||
{
|
{
|
||||||
/* EOF - pq_getmessage already logged error */
|
/* EOF - pq_getmessage already logged error */
|
||||||
pfree(buf.data);
|
pfree(buf.data);
|
||||||
@ -1201,7 +1201,7 @@ pg_SSPI_recvauth(Port *port)
|
|||||||
|
|
||||||
/* Get the actual SSPI token */
|
/* Get the actual SSPI token */
|
||||||
initStringInfo(&buf);
|
initStringInfo(&buf);
|
||||||
if (pq_getmessage(&buf, MAX_AUTH_TOKEN_LENGTH))
|
if (pq_getmessage(&buf, PG_MAX_AUTH_TOKEN_LENGTH))
|
||||||
{
|
{
|
||||||
/* EOF - pq_getmessage already logged error */
|
/* EOF - pq_getmessage already logged error */
|
||||||
pfree(buf.data);
|
pfree(buf.data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user