Skip to content

Commit 6f0ebe3

Browse files
committed
Deal with cases where getpeereid _and_ another creditial method is
supported.
1 parent f988edb commit 6f0ebe3

File tree

2 files changed

+8
-4
lines changed

2 files changed

+8
-4
lines changed

src/backend/libpq/auth.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.91 2002/09/04 23:31:34 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.92 2002/12/03 22:09:19 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -430,7 +430,9 @@ ClientAuthentication(Port *port)
430430
break;
431431

432432
case uaIdent:
433-
#if !defined(SO_PEERCRED) && (defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)))
433+
#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || \
434+
(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)) && \
435+
!defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED)
434436

435437
/*
436438
* If we are doing ident on unix-domain sockets, use SCM_CREDS

src/interfaces/libpq/fe-auth.c

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
* exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes).
1111
*
1212
* IDENTIFICATION
13-
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.71 2002/09/04 20:31:46 momjian Exp $
13+
* $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.72 2002/12/03 22:09:20 momjian Exp $
1414
*
1515
*-------------------------------------------------------------------------
1616
*/
@@ -449,7 +449,9 @@ pg_krb5_sendauth(char *PQerrormsg, int sock,
449449
static int
450450
pg_local_sendauth(char *PQerrormsg, PGconn *conn)
451451
{
452-
#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))
452+
#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || \
453+
(defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)) && \
454+
!defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED)
453455
char buf;
454456
struct iovec iov;
455457
struct msghdr msg;

0 commit comments

Comments
 (0)