10
10
*
11
11
*
12
12
* IDENTIFICATION
13
- * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.183 2009/03/07 21:28:00 mha Exp $
13
+ * $PostgreSQL: pgsql/src/backend/libpq/hba.c,v 1.184 2009/03/25 14:12:02 petere Exp $
14
14
*
15
15
*-------------------------------------------------------------------------
16
16
*/
@@ -578,7 +578,7 @@ check_db(const char *dbname, const char *role, char *param_str)
578
578
#define INVALID_AUTH_OPTION (optname , validmethods ) do {\
579
579
ereport(LOG, \
580
580
(errcode(ERRCODE_CONFIG_FILE_ERROR), \
581
- errmsg("authentication option '%s' is only valid for authentication methods '%s' ", \
581
+ errmsg("authentication option \"%s\" is only valid for authentication methods \"%s\" ", \
582
582
optname, validmethods), \
583
583
errcontext("line %d of configuration file \"%s\"", \
584
584
line_num, HbaFileName))); \
@@ -594,7 +594,7 @@ check_db(const char *dbname, const char *role, char *param_str)
594
594
if (argvar == NULL) {\
595
595
ereport(LOG, \
596
596
(errcode(ERRCODE_CONFIG_FILE_ERROR), \
597
- errmsg("authentication method '%s' requires argument '%s' to be set", \
597
+ errmsg("authentication method \"%s\" requires argument \"%s\" to be set", \
598
598
authname, argname), \
599
599
errcontext("line %d of configuration file \"%s\"", \
600
600
line_num, HbaFileName))); \
@@ -1024,7 +1024,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
1024
1024
{
1025
1025
ereport (LOG ,
1026
1026
(errcode (ERRCODE_CONFIG_FILE_ERROR ),
1027
- errmsg ("invalid ldap port '%s' " , c ),
1027
+ errmsg ("invalid LDAP port number: \"%s\" " , c ),
1028
1028
errcontext ("line %d of configuration file \"%s\"" ,
1029
1029
line_num , HbaFileName )));
1030
1030
return false;
@@ -1068,7 +1068,7 @@ parse_hba_line(List *line, int line_num, HbaLine *parsedline)
1068
1068
{
1069
1069
ereport (LOG ,
1070
1070
(errcode (ERRCODE_CONFIG_FILE_ERROR ),
1071
- errmsg ("unknown authentication option name '%s' " , token ),
1071
+ errmsg ("unknown authentication option name: \"%s\" " , token ),
1072
1072
errcontext ("line %d of configuration file \"%s\"" ,
1073
1073
line_num , HbaFileName )));
1074
1074
return false;
@@ -1488,7 +1488,7 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
1488
1488
pg_regerror (r , & re , errstr , sizeof (errstr ));
1489
1489
ereport (ERROR ,
1490
1490
(errcode (ERRCODE_INVALID_REGULAR_EXPRESSION ),
1491
- errmsg ("invalid regular expression '%s' : %s" , file_ident_user + 1 , errstr )));
1491
+ errmsg ("invalid regular expression \"%s\" : %s" , file_ident_user + 1 , errstr )));
1492
1492
1493
1493
pfree (wstr );
1494
1494
* error_p = true;
@@ -1510,7 +1510,7 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
1510
1510
pg_regerror (r , & re , errstr , sizeof (errstr ));
1511
1511
ereport (ERROR ,
1512
1512
(errcode (ERRCODE_INVALID_REGULAR_EXPRESSION ),
1513
- errmsg ("regular expression match for '%s' failed: %s" , file_ident_user + 1 , errstr )));
1513
+ errmsg ("regular expression match for \"%s\" failed: %s" , file_ident_user + 1 , errstr )));
1514
1514
* error_p = true;
1515
1515
}
1516
1516
@@ -1526,7 +1526,7 @@ parse_ident_usermap(List *line, int line_number, const char *usermap_name,
1526
1526
if (matches [1 ].rm_so < 0 )
1527
1527
ereport (ERROR ,
1528
1528
(errcode (ERRCODE_INVALID_REGULAR_EXPRESSION ),
1529
- errmsg ("regular expression '%s' has no subexpressions as requested by backreference in '%s' " ,
1529
+ errmsg ("regular expression \"%s\" has no subexpressions as requested by backreference in \"%s\" " ,
1530
1530
file_ident_user + 1 , file_pgrole )));
1531
1531
/* length: original length minus length of \1 plus length of match plus null terminator */
1532
1532
regexp_pgrole = palloc0 (strlen (file_pgrole ) - 2 + (matches [1 ].rm_eo - matches [1 ].rm_so ) + 1 );
@@ -1642,9 +1642,9 @@ check_usermap(const char *usermap_name,
1642
1642
if (!found_entry && !error )
1643
1643
{
1644
1644
ereport (LOG ,
1645
- (errmsg ("no match in usermap for user '%s' authenticated as '%s' " ,
1645
+ (errmsg ("no match in usermap for user \"%s\" authenticated as \"%s\" " ,
1646
1646
pg_role , auth_user ),
1647
- errcontext ("usermap '%s' " , usermap_name )));
1647
+ errcontext ("usermap \"%s\" " , usermap_name )));
1648
1648
}
1649
1649
return found_entry ?STATUS_OK :STATUS_ERROR ;
1650
1650
}
0 commit comments