1010 *
1111 *
1212 * IDENTIFICATION
13- * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.206 2010/04/21 03:32:53 tgl Exp $
13+ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.207 2010/05/26 16:43:13 tgl Exp $
1414 *
1515 *-------------------------------------------------------------------------
1616 */
@@ -711,7 +711,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
711711ereport (LOG ,
712712(errcode (ERRCODE_CONFIG_FILE_ERROR ),
713713errmsg ("hostssl not supported on this platform" ),
714- errhint ("compile with --enable-ssl to use SSL connections" ),
714+ errhint ("Compile with --enable-ssl to use SSL connections. " ),
715715errcontext ("line %d of configuration file \"%s\"" ,
716716line_num ,HbaFileName )));
717717return false;
@@ -890,8 +890,9 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
890890{
891891ereport (LOG ,
892892(errcode (ERRCODE_CONFIG_FILE_ERROR ),
893- errmsg ("IP address and mask do not match in file \"%s\" line %d" ,
894- HbaFileName ,line_num )));
893+ errmsg ("IP address and mask do not match" ),
894+ errcontext ("line %d of configuration file \"%s\"" ,
895+ line_num ,HbaFileName )));
895896return false;
896897}
897898}
@@ -944,7 +945,9 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
944945{
945946ereport (LOG ,
946947(errcode (ERRCODE_CONFIG_FILE_ERROR ),
947- errmsg ("MD5 authentication is not supported when \"db_user_namespace\" is enabled" )));
948+ errmsg ("MD5 authentication is not supported when \"db_user_namespace\" is enabled" ),
949+ errcontext ("line %d of configuration file \"%s\"" ,
950+ line_num ,HbaFileName )));
948951return false;
949952}
950953parsedline -> auth_method = uaMD5 ;
@@ -1086,7 +1089,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
10861089ereport (LOG ,
10871090(errcode (ERRCODE_CONFIG_FILE_ERROR ),
10881091errmsg ("client certificates can only be checked if a root certificate store is available" ),
1089- errdetail ( "make sure the root certificate store is present and readable" ),
1092+ errhint ( "Make sure the root.crt file is present and readable. " ),
10901093errcontext ("line %d of configuration file \"%s\"" ,
10911094line_num ,HbaFileName )));
10921095return false;
@@ -1245,7 +1248,8 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
12451248{
12461249ereport (LOG ,
12471250(errcode (ERRCODE_CONFIG_FILE_ERROR ),
1248- errmsg ("unknown authentication option name: \"%s\"" ,token ),
1251+ errmsg ("unrecognized authentication option name: \"%s\"" ,
1252+ token ),
12491253errcontext ("line %d of configuration file \"%s\"" ,
12501254line_num ,HbaFileName )));
12511255return false;
@@ -1606,7 +1610,8 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
16061610pg_regerror (r ,& re ,errstr ,sizeof (errstr ));
16071611ereport (LOG ,
16081612(errcode (ERRCODE_INVALID_REGULAR_EXPRESSION ),
1609- errmsg ("invalid regular expression \"%s\": %s" ,file_ident_user + 1 ,errstr )));
1613+ errmsg ("invalid regular expression \"%s\": %s" ,
1614+ file_ident_user + 1 ,errstr )));
16101615
16111616pfree (wstr );
16121617* error_p = true;
@@ -1628,7 +1633,8 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
16281633pg_regerror (r ,& re ,errstr ,sizeof (errstr ));
16291634ereport (LOG ,
16301635(errcode (ERRCODE_INVALID_REGULAR_EXPRESSION ),
1631- errmsg ("regular expression match for \"%s\" failed: %s" ,file_ident_user + 1 ,errstr )));
1636+ errmsg ("regular expression match for \"%s\" failed: %s" ,
1637+ file_ident_user + 1 ,errstr )));
16321638* error_p = true;
16331639}
16341640
@@ -1773,9 +1779,8 @@ check_usermap(const char *usermap_name,
17731779if (!found_entry && !error )
17741780{
17751781ereport (LOG ,
1776- (errmsg ("no match in usermap for user \"%s\" authenticated as \"%s\"" ,
1777- pg_role ,auth_user ),
1778- errcontext ("usermap \"%s\"" ,usermap_name )));
1782+ (errmsg ("no match in usermap \"%s\" for user \"%s\" authenticated as \"%s\"" ,
1783+ usermap_name ,pg_role ,auth_user )));
17791784}
17801785return found_entry ?STATUS_OK :STATUS_ERROR ;
17811786}
@@ -1798,7 +1803,7 @@ load_ident(void)
17981803/* not fatal ... we just won't do any special ident maps */
17991804ereport (LOG ,
18001805(errcode_for_file_access (),
1801- errmsg ("could not openIdent usermap file \"%s\": %m" ,
1806+ errmsg ("could not open usermap file \"%s\": %m" ,
18021807IdentFileName )));
18031808}
18041809else