Skip to content

Commit abc7f73

Browse files
committed
Have SSL text print only when SSL mode is enabled.
1 parent 74ca686 commit abc7f73

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

src/backend/libpq/auth.c

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.106 2003/07/26 13:50:02 momjian Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/libpq/auth.c,v 1.107 2003/07/26 15:22:22 momjian Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -440,15 +440,16 @@ ClientAuthentication(Port *port)
440440
NI_NUMERICHOST);
441441

442442
#ifdef USE_SSL
443-
#define EREPORT_SSL_STATUS (port->ssl ? "on" : "off")
444-
#else
445-
#define EREPORT_SSL_STATUS "off"
446-
#endif
447-
448443
ereport(FATAL,
449444
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
450445
errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\", SSL \"%s\"",
451-
hostinfo, port->user_name, port->database_name, EREPORT_SSL_STATUS)));
446+
hostinfo, port->user_name, port->database_name, port->ssl ? "on" : "off")));
447+
#else
448+
ereport(FATAL,
449+
(errcode(ERRCODE_INVALID_AUTHORIZATION_SPECIFICATION),
450+
errmsg("no pg_hba.conf entry for host \"%s\", user \"%s\", database \"%s\"",
451+
hostinfo, port->user_name, port->database_name)));
452+
#endif
452453
break;
453454
}
454455

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy