Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitc6d3158

Browse files
committed
Add some strings for translation and remove some cut'n'paste
that makes it impossible to translate to other languages.
1 parent020ec16 commitc6d3158

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

‎src/backend/libpq/auth.c

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.114 2003/12/20 18:24:52 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/libpq/auth.c,v 1.115 2004/08/04 16:05:13 dennis Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -345,7 +345,7 @@ pg_krb5_recvauth(Port *port)
345345
staticvoid
346346
auth_failed(Port*port,intstatus)
347347
{
348-
constchar*authmethod="Unknown auth method:";
348+
constchar*errstr;
349349

350350
/*
351351
* If we failed due to EOF from client, just quit; there's no point in
@@ -363,36 +363,38 @@ auth_failed(Port *port, int status)
363363
switch (port->auth_method)
364364
{
365365
caseuaReject:
366-
authmethod="Rejected host:";
366+
errstr=gettext("Rejected host: authentication failed for user \"%s\"");
367367
break;
368368
caseuaKrb4:
369-
authmethod="Kerberos4";
369+
errstr=gettext("Kerberos4 authentication failed for user \"%s\"");
370370
break;
371371
caseuaKrb5:
372-
authmethod="Kerberos5";
372+
errstr=gettext("Kerberos5 authentication failed for user \"%s\"");
373373
break;
374374
caseuaTrust:
375-
authmethod="Trusted";
375+
errstr=gettext("Trusted authentication failed for user \"%s\"");
376376
break;
377377
caseuaIdent:
378-
authmethod="IDENT";
378+
errstr=gettext("IDENT authentication failed for user \"%s\"");
379379
break;
380380
caseuaMD5:
381381
caseuaCrypt:
382382
caseuaPassword:
383-
authmethod="Password";
383+
errstr=gettext("Password authentication failed for user \"%s\"");
384384
break;
385385
#ifdefUSE_PAM
386386
caseuaPAM:
387-
authmethod="PAM";
387+
errstr=gettext("PAM authentication failed for user \"%s\"");
388388
break;
389389
#endif/* USE_PAM */
390+
default :
391+
errstr=gettext("Unknown auth method: authentication failed for user \"%s\"");
392+
break;
390393
}
391394

392395
ereport(FATAL,
393396
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
394-
errmsg("%s authentication failed for user \"%s\"",
395-
authmethod,port->user_name)));
397+
errmsg(errstr,port->user_name)));
396398
/* doesn't return */
397399
}
398400

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp