Index: src/backend/libpq/auth.c =================================================================== RCS file: /projects/cvsroot/pgsql/src/backend/libpq/auth.c,v retrieving revision 1.167 diff -c -r1.167 auth.c *** src/backend/libpq/auth.c 1 Aug 2008 11:41:12 -0000 1.167 --- src/backend/libpq/auth.c 12 Sep 2008 03:51:29 -0000 *************** *** 197,202 **** --- 197,203 ---- auth_failed(Port *port, int status) { const char *errstr; + const char *hintstr; /* * If we failed due to EOF from client, just quit; there's no point in *************** *** 215,259 **** { case uaReject: errstr = gettext_noop("authentication failed for user \"%s\": host rejected"); break; case uaKrb5: errstr = gettext_noop("Kerberos 5 authentication failed for user \"%s\""); break; case uaGSS: errstr = gettext_noop("GSSAPI authentication failed for user \"%s\""); break; case uaSSPI: errstr = gettext_noop("SSPI authentication failed for user \"%s\""); break; case uaTrust: errstr = gettext_noop("\"trust\" authentication failed for user \"%s\""); break; case uaIdent: errstr = gettext_noop("Ident authentication failed for user \"%s\""); break; case uaMD5: case uaCrypt: case uaPassword: errstr = gettext_noop("password authentication failed for user \"%s\""); break; #ifdef USE_PAM case uaPAM: errstr = gettext_noop("PAM authentication failed for user \"%s\""); break; #endif /* USE_PAM */ #ifdef USE_LDAP case uaLDAP: errstr = gettext_noop("LDAP authentication failed for user \"%s\""); break; #endif /* USE_LDAP */ default: errstr = gettext_noop("authentication failed for user \"%s\": invalid authentication method"); break; } ereport(FATAL, (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), ! errmsg(errstr, port->user_name))); /* doesn't return */ } --- 216,271 ---- { case uaReject: errstr = gettext_noop("authentication failed for user \"%s\": host rejected"); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html"); break; case uaKrb5: errstr = gettext_noop("Kerberos 5 authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html#GSSAPI-AUTH"); break; case uaGSS: errstr = gettext_noop("GSSAPI authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html#GSSAPI-AUTH"); break; case uaSSPI: errstr = gettext_noop("SSPI authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html#SSPI-AUTH"); break; case uaTrust: errstr = gettext_noop("\"trust\" authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html#TRUST-AUTH"); break; case uaIdent: errstr = gettext_noop("Ident authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/client-authentication.html#AUTH-IDENT"); break; case uaMD5: case uaCrypt: case uaPassword: errstr = gettext_noop("password authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-PASSWORD"); break; #ifdef USE_PAM case uaPAM: errstr = gettext_noop("PAM authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-PAM"); break; #endif /* USE_PAM */ #ifdef USE_LDAP case uaLDAP: errstr = gettext_noop("LDAP authentication failed for user \"%s\""); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html#AUTH-PAM"); break; #endif /* USE_LDAP */ default: errstr = gettext_noop("authentication failed for user \"%s\": invalid authentication method"); + hintstr = gettext_noop("http://www.postgresql.org/docs/current/static/auth-methods.html"); break; } ereport(FATAL, (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION), ! errmsg(errstr, port->user_name), ! errhint(hintstr))); /* doesn't return */ }