diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-09-26 19:54:12 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-09-26 19:54:12 +0000 |
commit | be83aac6d26ecca0bd27801132b9606ffda480f2 (patch) | |
tree | 3da0dcae76a2d7ee989ba85d7fcc726f7ad60595 /src/interfaces/libpq/fe-auth.c | |
parent | 16b9b75876ce03a1e9f5deb00142a05ce49a388c (diff) | |
download | postgresql-be83aac6d26ecca0bd27801132b9606ffda480f2.tar.gz postgresql-be83aac6d26ecca0bd27801132b9606ffda480f2.zip |
Disable local creds on OpenBSD because it doesn't support it. Document
supported platforms in pg_hba.conf.
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
-rw-r--r-- | src/interfaces/libpq/fe-auth.c | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index bb60bb1ceb9..4b4b0399107 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 - * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.60 2001/09/21 20:31:49 tgl Exp $ + * $Header: /cvsroot/pgsql/src/interfaces/libpq/fe-auth.c,v 1.61 2001/09/26 19:54:12 momjian Exp $ * *------------------------------------------------------------------------- */ @@ -435,10 +435,10 @@ pg_krb5_sendauth(char *PQerrormsg, int sock, #endif /* KRB5 */ -#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || defined(HAVE_STRUCT_SOCKCRED) static int pg_local_sendauth(char *PQerrormsg, PGconn *conn) { +#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || (defined(HAVE_STRUCT_SOCKCRED) && defined(LOCAL_CREDS)) char buf; struct iovec iov; struct msghdr msg; @@ -485,8 +485,12 @@ pg_local_sendauth(char *PQerrormsg, PGconn *conn) return STATUS_ERROR; } return STATUS_OK; -} +#else + snprintf(PQerrormsg, PQERRORMSG_LENGTH, + libpq_gettext("SCM_CRED authentication method not supported\n")); + return STATUS_ERROR; #endif +} static int pg_password_sendauth(PGconn *conn, const char *password, AuthRequest areq) @@ -614,14 +618,8 @@ fe_sendauth(AuthRequest areq, PGconn *conn, const char *hostname, break; case AUTH_REQ_SCM_CREDS: -#if defined(HAVE_STRUCT_CMSGCRED) || defined(HAVE_STRUCT_FCRED) || defined(HAVE_STRUCT_SOCKCRED) if (pg_local_sendauth(PQerrormsg, conn) != STATUS_OK) return STATUS_ERROR; -#else - snprintf(PQerrormsg, PQERRORMSG_LENGTH, - libpq_gettext("SCM_CRED authentication method not supported\n")); - return STATUS_ERROR; -#endif break; default: |