mirror of
https://github.com/postgres/postgres.git
synced 2025-10-29 22:49:41 +03:00
Refactor libpq authentication request processing.
Move the responsibility of reading the data from the authentication request message from PQconnectPoll() to pg_fe_sendauth(). This way, PQconnectPoll() doesn't need to know about all the different authentication request types, and we don't need the extra fields in the pg_conn struct to pass the data from PQconnectPoll() to pg_fe_sendauth() anymore. Reviewed by Michael Paquier. Discussion: https://www.postgresql.org/message-id/6490b975-5ee1-6280-ac1d-af975b19fb9a%40iki.fi
This commit is contained in:
@@ -419,7 +419,6 @@ struct pg_conn
|
||||
/* Miscellaneous stuff */
|
||||
int be_pid; /* PID of backend --- needed for cancels */
|
||||
int be_key; /* key of backend --- needed for cancels */
|
||||
char md5Salt[4]; /* password salt received from backend */
|
||||
pgParameterStatus *pstatus; /* ParameterStatus data */
|
||||
int client_encoding; /* encoding id */
|
||||
bool std_strings; /* standard_conforming_strings */
|
||||
@@ -452,10 +451,6 @@ struct pg_conn
|
||||
PGresult *result; /* result being constructed */
|
||||
PGresult *next_result; /* next result (used in single-row mode) */
|
||||
|
||||
/* Buffer to hold incoming authentication request data */
|
||||
char *auth_req_inbuf;
|
||||
int auth_req_inlen;
|
||||
|
||||
/* Assorted state for SASL, SSL, GSS, etc */
|
||||
void *sasl_state;
|
||||
|
||||
@@ -479,14 +474,10 @@ struct pg_conn
|
||||
#ifdef ENABLE_GSS
|
||||
gss_ctx_id_t gctx; /* GSS context */
|
||||
gss_name_t gtarg_nam; /* GSS target name */
|
||||
gss_buffer_desc ginbuf; /* GSS input token */
|
||||
gss_buffer_desc goutbuf; /* GSS output token */
|
||||
#endif
|
||||
|
||||
#ifdef ENABLE_SSPI
|
||||
#ifndef ENABLE_GSS
|
||||
gss_buffer_desc ginbuf; /* GSS input token */
|
||||
#else
|
||||
#ifdef ENABLE_GSS
|
||||
char *gsslib; /* What GSS library to use ("gssapi" or
|
||||
* "sspi") */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user