diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-08 19:32:58 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2005-10-08 19:32:58 +0000 |
commit | 18d0ca2d1bf48f4b62cab4df4625b7f230b7c0c1 (patch) | |
tree | 2a3ca95f85df6a7444aa82c35eadf395d99e0cdf /src/interfaces/libpq/fe-auth.c | |
parent | 49093572370b5b823956355dd7fb67cbbe0c523a (diff) | |
download | postgresql-18d0ca2d1bf48f4b62cab4df4625b7f230b7c0c1.tar.gz postgresql-18d0ca2d1bf48f4b62cab4df4625b7f230b7c0c1.zip |
Fix Kerberos authentication in wake of virtual-hosts changes --- need
to call krb5_sname_to_principal() always. Also, use krb_srvname rather
than the hardwired string 'postgres' as the appl_version string in the
krb5_sendauth/recvauth calls, to avoid breaking compatibility with PG
8.0. Magnus Hagander
Diffstat (limited to 'src/interfaces/libpq/fe-auth.c')
-rw-r--r-- | src/interfaces/libpq/fe-auth.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/interfaces/libpq/fe-auth.c b/src/interfaces/libpq/fe-auth.c index c79e38a9363..4075aad6145 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.103 2005/06/30 01:59:20 neilc Exp $ + * $PostgreSQL: pgsql/src/interfaces/libpq/fe-auth.c,v 1.104 2005/10/08 19:32:58 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -280,7 +280,7 @@ pg_krb5_sendauth(char *PQerrormsg, int sock, const char *hostname, const char *s } retval = krb5_sendauth(pg_krb5_context, &auth_context, - (krb5_pointer) & sock, "postgres", + (krb5_pointer) & sock, (char *) servicename, pg_krb5_client, server, AP_OPTS_MUTUAL_REQUIRED, NULL, 0, /* no creds, use ccache instead */ |