Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Fix set of NLS translation issues
authorMichael Paquier <michael@paquier.xyz>
Tue, 21 Aug 2018 06:18:35 +0000 (15:18 +0900)
committerMichael Paquier <michael@paquier.xyz>
Tue, 21 Aug 2018 06:18:56 +0000 (15:18 +0900)
While monitoring the code, it has been noticed that GSSAPI
authentication missed two translations.

Reported-by: Kyotaro Horiguchi
Author: Kyotaro Horiguchi
Reviewed-by: Michael Paquier, Tom Lane
Discussion: https://postgr.es/m/20180810.152131.31921918.horiguchi.kyotaro@lab.ntt.co.jp
Backpatch-through: 9.3

src/backend/libpq/auth.c

index 25328ea091500710eb59742c2ca8b0d94cceff56..2735206453315de55ef56f1cc338132663bca9d9 100644 (file)
@@ -963,6 +963,10 @@ static GSS_DLLIMP gss_OID GSS_C_NT_USER_NAME = &GSS_C_NT_USER_NAME_desc;
 #endif
 
 
+/*
+ * Generate an error for GSSAPI authentication.  The caller should apply
+ * _() to errmsg to make it translatable.
+ */
 static void
 pg_GSS_error(int severity, char *errmsg, OM_uint32 maj_stat, OM_uint32 min_stat)
 {
@@ -1147,7 +1151,7 @@ pg_GSS_recvauth(Port *port)
        {
            gss_delete_sec_context(&lmin_s, &port->gss->ctx, GSS_C_NO_BUFFER);
            pg_GSS_error(ERROR,
-                      gettext_noop("accepting GSS security context failed"),
+                        _("accepting GSS security context failed"),
                         maj_stat, min_stat);
        }
 
@@ -1173,7 +1177,7 @@ pg_GSS_recvauth(Port *port)
    maj_stat = gss_display_name(&min_stat, port->gss->name, &gbuf, NULL);
    if (maj_stat != GSS_S_COMPLETE)
        pg_GSS_error(ERROR,
-                    gettext_noop("retrieving GSS user name failed"),
+                    _("retrieving GSS user name failed"),
                     maj_stat, min_stat);
 
    /*
@@ -1237,6 +1241,11 @@ pg_GSS_recvauth(Port *port)
  *----------------------------------------------------------------
  */
 #ifdef ENABLE_SSPI
+
+/*
+ * Generate an error for SSPI authentication.  The caller should apply
+ * _() to errmsg to make it translatable.
+ */
 static void
 pg_SSPI_error(int severity, const char *errmsg, SECURITY_STATUS r)
 {