mirror of
https://github.com/postgres/postgres.git
synced 2025-11-10 17:42:29 +03:00
Message editing: remove gratuitous variations in message wording, standardize
terms, add some clarifications, fix some untranslatable attempts at dynamic message building.
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.110 2003/08/04 02:39:59 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.111 2003/09/25 06:57:59 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -110,20 +110,20 @@ pg_krb4_recvauth(Port *port)
|
||||
if (status != KSUCCESS)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos error: %s", krb_err_txt[status])));
|
||||
(errmsg("Kerberos error: %s", krb_err_txt[status])));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
if (strncmp(version, PG_KRB4_VERSION, KRB_SENDAUTH_VLEN) != 0)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos protocol version \"%s\" != \"%s\"",
|
||||
(errmsg("unexpected Kerberos protocol version received from client (received \"%s\", expected \"%s\")",
|
||||
version, PG_KRB4_VERSION)));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
if (strncmp(port->user_name, auth_data.pname, SM_DATABASE_USER) != 0)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos user name \"%s\" != \"%s\"",
|
||||
(errmsg("unexpected Kerberos user name received from client (received \"%s\", expected \"%s\")",
|
||||
port->user_name, auth_data.pname)));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
@@ -137,7 +137,7 @@ pg_krb4_recvauth(Port *port)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("kerberos v4 not implemented on this server")));
|
||||
errmsg("Kerberos 4 not implemented on this server")));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
#endif /* KRB4 */
|
||||
@@ -198,7 +198,7 @@ pg_krb5_init(void)
|
||||
if (retval)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos init returned error %d",
|
||||
(errmsg("Kerberos initialization returned error %d",
|
||||
retval)));
|
||||
com_err("postgres", retval, "while initializing krb5");
|
||||
return STATUS_ERROR;
|
||||
@@ -208,7 +208,7 @@ pg_krb5_init(void)
|
||||
if (retval)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos keytab resolve returned error %d",
|
||||
(errmsg("Kerberos keytab resolving returned error %d",
|
||||
retval)));
|
||||
com_err("postgres", retval, "while resolving keytab file \"%s\"",
|
||||
pg_krb_server_keyfile);
|
||||
@@ -221,7 +221,7 @@ pg_krb5_init(void)
|
||||
if (retval)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos sname_to_principal(\"%s\") returned error %d",
|
||||
(errmsg("Kerberos sname_to_principal(\"%s\") returned error %d",
|
||||
PG_KRB_SRVNAM, retval)));
|
||||
com_err("postgres", retval,
|
||||
"while getting server principal for service \"%s\"",
|
||||
@@ -266,7 +266,7 @@ pg_krb5_recvauth(Port *port)
|
||||
if (retval)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos recvauth returned error %d",
|
||||
(errmsg("Kerberos recvauth returned error %d",
|
||||
retval)));
|
||||
com_err("postgres", retval, "from krb5_recvauth");
|
||||
return STATUS_ERROR;
|
||||
@@ -291,7 +291,7 @@ pg_krb5_recvauth(Port *port)
|
||||
if (retval)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos unparse_name returned error %d",
|
||||
(errmsg("Kerberos unparse_name returned error %d",
|
||||
retval)));
|
||||
com_err("postgres", retval, "while unparsing client name");
|
||||
krb5_free_ticket(pg_krb5_context, ticket);
|
||||
@@ -303,7 +303,7 @@ pg_krb5_recvauth(Port *port)
|
||||
if (strncmp(port->user_name, kusername, SM_DATABASE_USER))
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("kerberos user name \"%s\" != \"%s\"",
|
||||
(errmsg("unexpected Kerberos user name received from client (received \"%s\", expected \"%s\")",
|
||||
port->user_name, kusername)));
|
||||
ret = STATUS_ERROR;
|
||||
}
|
||||
@@ -324,7 +324,7 @@ pg_krb5_recvauth(Port *port)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("kerberos v5 not implemented on this server")));
|
||||
errmsg("Kerberos 5 not implemented on this server")));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
#endif /* KRB5 */
|
||||
@@ -416,7 +416,7 @@ ClientAuthentication(Port *port)
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_CONFIG_FILE_ERROR),
|
||||
errmsg("missing or erroneous pg_hba.conf file"),
|
||||
errhint("See postmaster log for details.")));
|
||||
errhint("See server log for details.")));
|
||||
|
||||
switch (port->auth_method)
|
||||
{
|
||||
@@ -460,7 +460,7 @@ ClientAuthentication(Port *port)
|
||||
|| port->laddr.addr.ss_family != AF_INET)
|
||||
ereport(FATAL,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("kerberos 4 only supports IPv4 connections")));
|
||||
errmsg("Kerberos 4 only supports IPv4 connections")));
|
||||
sendAuthRequest(port, AUTH_REQ_KRB4);
|
||||
status = pg_krb4_recvauth(port);
|
||||
break;
|
||||
@@ -676,7 +676,7 @@ CheckPAMAuth(Port *port, char *user, char *password)
|
||||
if (retval != PAM_SUCCESS)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("Failed to create PAM authenticator: %s",
|
||||
(errmsg("could not create PAM authenticator: %s",
|
||||
pam_strerror(pamh, retval))));
|
||||
pam_passwd = NULL; /* Unset pam_passwd */
|
||||
return STATUS_ERROR;
|
||||
@@ -731,7 +731,7 @@ CheckPAMAuth(Port *port, char *user, char *password)
|
||||
if (retval != PAM_SUCCESS)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("failed to release PAM authenticator: %s",
|
||||
(errmsg("could not release PAM authenticator: %s",
|
||||
pam_strerror(pamh, retval))));
|
||||
}
|
||||
|
||||
@@ -769,7 +769,7 @@ recv_password_packet(Port *port)
|
||||
if (mtype != EOF)
|
||||
ereport(COMMERROR,
|
||||
(errcode(ERRCODE_PROTOCOL_VIOLATION),
|
||||
errmsg("expected password response, got msg type %d",
|
||||
errmsg("expected password response, got message type %d",
|
||||
mtype)));
|
||||
return NULL; /* EOF or bad message type */
|
||||
}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.41 2003/08/12 18:23:20 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.42 2003/09/25 06:57:59 petere Exp $
|
||||
*
|
||||
* Since the server static private key ($DataDir/server.key)
|
||||
* will normally be stored unencrypted so that the database
|
||||
@@ -681,7 +681,7 @@ initialize_SSL(void)
|
||||
{
|
||||
/* Not fatal - we do not require client certificates */
|
||||
ereport(LOG,
|
||||
(errmsg("could not load root cert file \"%s\": %s",
|
||||
(errmsg("could not load root certificate file \"%s\": %s",
|
||||
fnbuf, SSLerrmessage()),
|
||||
errdetail("Will not verify client certificates.")));
|
||||
return 0;
|
||||
@@ -742,7 +742,7 @@ open_server_SSL(Port *port)
|
||||
port->peer_cn[sizeof(port->peer_cn) - 1] = '\0';
|
||||
}
|
||||
ereport(DEBUG2,
|
||||
(errmsg("secure connection from \"%s\"", port->peer_cn)));
|
||||
(errmsg("SSL connection from \"%s\"", port->peer_cn)));
|
||||
|
||||
/* set up debugging/info callback */
|
||||
SSL_CTX_set_info_callback(SSL_context, info_cb);
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.56 2003/08/04 02:39:59 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/crypt.c,v 1.57 2003/09/25 06:57:59 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -59,7 +59,7 @@ md5_crypt_verify(const Port *port, const char *user, char *client_pass)
|
||||
if (isMD5(shadow_pass) && port->auth_method == uaCrypt)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("cannot use CRYPT auth method because password is MD5-encrypted")));
|
||||
(errmsg("cannot use authentication method \"crypt\" because password is MD5-encrypted")));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.114 2003/09/05 23:07:21 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/hba.c,v 1.115 2003/09/25 06:57:59 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -663,7 +663,7 @@ parse_hba(List *line, hbaPort *port, bool *found_p, bool *error_p)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode(ERRCODE_CONFIG_FILE_ERROR),
|
||||
errmsg("could not interpret IP address \"%s\" in config file: %s",
|
||||
errmsg("invalid IP address \"%s\" in pg_hba.conf file: %s",
|
||||
token, gai_strerror(ret))));
|
||||
if (cidr_slash)
|
||||
*cidr_slash = '/';
|
||||
@@ -815,7 +815,7 @@ group_openfile(void)
|
||||
if (groupfile == NULL && errno != ENOENT)
|
||||
ereport(LOG,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not open \"%s\": %m", filename)));
|
||||
errmsg("could not open file \"%s\": %m", filename)));
|
||||
|
||||
pfree(filename);
|
||||
|
||||
@@ -839,7 +839,7 @@ user_openfile(void)
|
||||
if (pwdfile == NULL && errno != ENOENT)
|
||||
ereport(LOG,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not open \"%s\": %m", filename)));
|
||||
errmsg("could not open file \"%s\": %m", filename)));
|
||||
|
||||
pfree(filename);
|
||||
|
||||
@@ -958,7 +958,7 @@ load_hba(void)
|
||||
if (file == NULL)
|
||||
ereport(FATAL,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not open config file \"%s\": %m",
|
||||
errmsg("could not open configuration file \"%s\": %m",
|
||||
conf_file)));
|
||||
|
||||
hba_lines = tokenize_file(file);
|
||||
@@ -1057,7 +1057,7 @@ check_ident_usermap(const char *usermap_name,
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode(ERRCODE_CONFIG_FILE_ERROR),
|
||||
errmsg("cannot use IDENT authentication without usermap field")));
|
||||
errmsg("cannot use Ident authentication without usermap field")));
|
||||
found_entry = false;
|
||||
}
|
||||
else if (strcmp(usermap_name, "sameuser") == 0)
|
||||
@@ -1105,7 +1105,7 @@ load_ident(void)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not open usermap file \"%s\": %m",
|
||||
errmsg("could not open Ident usermap file \"%s\": %m",
|
||||
map_file)));
|
||||
}
|
||||
else
|
||||
@@ -1276,7 +1276,7 @@ ident_inet(const SockAddr remote_addr,
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("could not create socket for IDENT connection: %m")));
|
||||
errmsg("could not create socket for Ident connection: %m")));
|
||||
ident_return = false;
|
||||
goto ident_inet_done;
|
||||
}
|
||||
@@ -1304,7 +1304,7 @@ ident_inet(const SockAddr remote_addr,
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("could not connect to IDENT server at address \"%s\", port %s: %m",
|
||||
errmsg("could not connect to Ident server at address \"%s\", port %s: %m",
|
||||
remote_addr_s, ident_port)));
|
||||
ident_return = false;
|
||||
goto ident_inet_done;
|
||||
@@ -1324,7 +1324,7 @@ ident_inet(const SockAddr remote_addr,
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("could not send query to IDENT server at address \"%s\", port %s: %m",
|
||||
errmsg("could not send query to Ident server at address \"%s\", port %s: %m",
|
||||
remote_addr_s, ident_port)));
|
||||
ident_return = false;
|
||||
goto ident_inet_done;
|
||||
@@ -1339,7 +1339,7 @@ ident_inet(const SockAddr remote_addr,
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("could not receive response from IDENT server at address \"%s\", port %s: %m",
|
||||
errmsg("could not receive response from Ident server at address \"%s\", port %s: %m",
|
||||
remote_addr_s, ident_port)));
|
||||
ident_return = false;
|
||||
goto ident_inet_done;
|
||||
@@ -1380,7 +1380,7 @@ ident_unix(int sock, char *ident_user)
|
||||
/* We didn't get a valid credentials struct. */
|
||||
ereport(LOG,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("could not receive credentials: %m")));
|
||||
errmsg("could not get peer credentials: %m")));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1389,7 +1389,7 @@ ident_unix(int sock, char *ident_user)
|
||||
if (pass == NULL)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("local user with uid %d is not known to getpwuid",
|
||||
(errmsg("local user with ID %d does not exist",
|
||||
(int) uid)));
|
||||
return false;
|
||||
}
|
||||
@@ -1411,7 +1411,7 @@ ident_unix(int sock, char *ident_user)
|
||||
/* We didn't get a valid credentials struct. */
|
||||
ereport(LOG,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("could not receive credentials: %m")));
|
||||
errmsg("could not get peer credentials: %m")));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1420,7 +1420,7 @@ ident_unix(int sock, char *ident_user)
|
||||
if (pass == NULL)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("local user with uid %d is not known to getpwuid",
|
||||
(errmsg("local user with ID %d does not exist",
|
||||
(int) peercred.uid)));
|
||||
return false;
|
||||
}
|
||||
@@ -1479,7 +1479,7 @@ ident_unix(int sock, char *ident_user)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_socket_access(),
|
||||
errmsg("could not receive credentials: %m")));
|
||||
errmsg("could not get peer credentials: %m")));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -1490,7 +1490,7 @@ ident_unix(int sock, char *ident_user)
|
||||
if (pw == NULL)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errmsg("local user with uid %d is not known to getpwuid",
|
||||
(errmsg("local user with ID %d does not exist",
|
||||
(int) cred->cruid)));
|
||||
return false;
|
||||
}
|
||||
@@ -1502,7 +1502,7 @@ ident_unix(int sock, char *ident_user)
|
||||
#else
|
||||
ereport(LOG,
|
||||
(errcode(ERRCODE_FEATURE_NOT_SUPPORTED),
|
||||
errmsg("IDENT auth is not supported on local connections on this platform")));
|
||||
errmsg("Ident authentication is not supported on local connections on this platform")));
|
||||
|
||||
return false;
|
||||
#endif
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
* Portions Copyright (c) 1996-2003, PostgreSQL Global Development Group
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.165 2003/08/12 22:42:01 tgl Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/libpq/pqcomm.c,v 1.166 2003/09/25 06:57:59 petere Exp $
|
||||
*
|
||||
*-------------------------------------------------------------------------
|
||||
*/
|
||||
@@ -245,7 +245,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
|
||||
{
|
||||
if (hostName)
|
||||
ereport(LOG,
|
||||
(errmsg("could not translate hostname \"%s\", service \"%s\" to address: %s",
|
||||
(errmsg("could not translate host name \"%s\", service \"%s\" to address: %s",
|
||||
hostName, service, gai_strerror(ret))));
|
||||
else
|
||||
ereport(LOG,
|
||||
@@ -356,7 +356,7 @@ StreamServerPort(int family, char *hostName, unsigned short portNumber,
|
||||
familyDesc),
|
||||
(IS_AF_UNIX(addr->ai_family)) ?
|
||||
errhint("Is another postmaster already running on port %d?"
|
||||
" If not, remove socket node \"%s\" and retry.",
|
||||
" If not, remove socket file \"%s\" and retry.",
|
||||
(int) portNumber, sock_path) :
|
||||
errhint("Is another postmaster already running on port %d?"
|
||||
" If not, wait a few seconds and retry.",
|
||||
@@ -482,7 +482,7 @@ Setup_AF_UNIX(void)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not set group of \"%s\": %m",
|
||||
errmsg("could not set group of file \"%s\": %m",
|
||||
sock_path)));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
@@ -493,7 +493,7 @@ Setup_AF_UNIX(void)
|
||||
{
|
||||
ereport(LOG,
|
||||
(errcode_for_file_access(),
|
||||
errmsg("could not set permissions of \"%s\": %m",
|
||||
errmsg("could not set permissions of file \"%s\": %m",
|
||||
sock_path)));
|
||||
return STATUS_ERROR;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user