]> granicus.if.org Git - postgresql/commitdiff
Have SSL text print only when SSL mode is enabled.
authorBruce Momjian <bruce@momjian.us>
Sat, 26 Jul 2003 15:22:22 +0000 (15:22 +0000)
committerBruce Momjian <bruce@momjian.us>
Sat, 26 Jul 2003 15:22:22 +0000 (15:22 +0000)
src/backend/libpq/auth.c

index fd8d54a012db06e5c64cea309b9ac95e9e5f57e6..b610100d2d14a971db803f0c1611a8ef4a3be557 100644 (file)
@@ -8,7 +8,7 @@
  *
  *
  * IDENTIFICATION
- *       $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.106 2003/07/26 13:50:02 momjian Exp $
+ *       $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.107 2003/07/26 15:22:22 momjian Exp $
  *
  *-------------------------------------------------------------------------
  */
@@ -440,15 +440,16 @@ ClientAuthentication(Port *port)
                                                                NI_NUMERICHOST);
 
 #ifdef USE_SSL
-#define EREPORT_SSL_STATUS     (port->ssl ? "on" : "off")
-#else
-#define EREPORT_SSL_STATUS     "off"
-#endif
-
                                ereport(FATAL,
                                                (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
                                                 errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", SSL \"%s\"",
-                                                               hostinfo, port->user_name, port->database_name, EREPORT_SSL_STATUS)));
+                                                               hostinfo, port->user_name, port->database_name, port->ssl ? "on" : "off")));
+#else
+                               ereport(FATAL,
+                                               (errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
+                                                errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"",
+                                                               hostinfo, port->user_name, port->database_name)));
+#endif
                                break;
                        }