mirror of
https://github.com/postgres/postgres.git
synced 2025-05-18 17:41:14 +03:00
Dept. of third thoughts: in fact, libpq should support SCM_CREDS challenge
even when HAVE_GETPEEREID is defined, else it will be unable to connect to pre-7.4 backends that are using IDENT authentication.
This commit is contained in:
parent
7133152c5b
commit
1661b86bca
@ -10,7 +10,7 @@
|
|||||||
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
|
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
|
||||||
*
|
*
|
||||||
* IDENTIFICATION
|
* IDENTIFICATION
|
||||||
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.84.2.2 2003/12/20 18:25:02 tgl Exp $
|
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.84.2.3 2003/12/20 18:46:02 tgl Exp $
|
||||||
*
|
*
|
||||||
*-------------------------------------------------------------------------
|
*-------------------------------------------------------------------------
|
||||||
*/
|
*/
|
||||||
@ -450,16 +450,15 @@ pg_krb5_sendauth(char *PQerrormsg, int sock, const char *hostname)
|
|||||||
/*
|
/*
|
||||||
* Respond to AUTH_REQ_SCM_CREDS challenge.
|
* Respond to AUTH_REQ_SCM_CREDS challenge.
|
||||||
*
|
*
|
||||||
* Note: the backend will not use this challenge if HAVE_GETPEEREID
|
* Note: current backends will not use this challenge if HAVE_GETPEEREID
|
||||||
* or SO_PEERCRED is defined, so we don't bother to compile any code
|
* or SO_PEERCRED is defined, but pre-7.4 backends might, so compile the
|
||||||
* in that case, even if the facility is available.
|
* code anyway.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
pg_local_sendauth(char *PQerrormsg, PGconn *conn)
|
pg_local_sendauth(char *PQerrormsg, PGconn *conn)
|
||||||
{
|
{
|
||||||
#if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && \
|
#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || \
|
||||||
(defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || \
|
(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))
|
||||||
(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)))
|
|
||||||
char buf;
|
char buf;
|
||||||
struct iovec iov;
|
struct iovec iov;
|
||||||
struct msghdr msg;
|
struct msghdr msg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user