diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2003-12-20 18:45:49 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2003-12-20 18:45:49 +0000 |
commit | fb8ac3fcb6b6a355f82be90c7065de5640089150 (patch) | |
tree | 7521dd376896603b8b603b37e9f7848af397b826 /src/interfaces/libpq/fe-auth.c | |
parent | b8f2980209876f060a189cc1dbc4af520b735791 (diff) |
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.
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
-rw-r--r-- | src/interfaces/libpq/fe-auth.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index f3aa18dff57..e0c51b203db 100644 --- a/src/interfaces/libpq/fe-auth.c +++ b/src/interfaces/libpq/fe-auth.c @@ -10,7 +10,7 @@ * exceed INITIAL_EXPBUFFER_SIZE (currently 256 bytes). * * IDENTIFICATION - * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.87 2003/12/20 18:24:52 tgl Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.88 2003/12/20 18:45:49 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -450,16 +450,15 @@ pg_krb5_sendauth(char *PQerrormsg, int sock, const char *hostname) /* * Respond to AUTH_REQ_SCM_CREDS challenge. * - * Note: the backend will not use this challenge if HAVE_GETPEEREID - * or SO_PEERCRED is defined, so we don't bother to compile any code - * in that case, even if the facility is available. + * Note: current backends will not use this challenge if HAVE_GETPEEREID + * or SO_PEERCRED is defined, but pre-7.4 backends might, so compile the + * code anyway. */ static int pg_local_sendauth(char *PQerrormsg, PGconn *conn) { -#if !defined(HAVE_GETPEEREID) && !defined(SO_PEERCRED) && \ - (defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || \ - (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS))) +#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || \ + (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)) char buf; struct iovec iov; struct msghdr msg; |