mirror of
https://github.com/postgres/postgres.git
synced 2025-11-07 19:06:32 +03:00
Remove IS_AF_UNIX macro
The AF_UNIX macro was being used unprotected by HAVE_UNIX_SOCKETS, apparently since 2008. So the redirection through IS_AF_UNIX() is apparently no longer necessary. (More generally, all supported platforms are now HAVE_UNIX_SOCKETS, but even if there were a new platform in the future, it seems plausible that it would define the AF_UNIX symbol even without kernel support.) So remove the IS_AF_UNIX() macro and make the code a bit more consistent. Discussion: https://www.postgresql.org/message-id/flat/f2d26815-9832-e333-d52d-72fbc0ade896%40enterprisedb.com
This commit is contained in:
@@ -2085,7 +2085,7 @@ ProcessStartupPacket(Port *port, bool ssl_done, bool gss_done)
|
||||
|
||||
#ifdef USE_SSL
|
||||
/* No SSL when disabled or on Unix sockets */
|
||||
if (!LoadedSSL || IS_AF_UNIX(port->laddr.addr.ss_family))
|
||||
if (!LoadedSSL || port->laddr.addr.ss_family == AF_UNIX)
|
||||
SSLok = 'N';
|
||||
else
|
||||
SSLok = 'S'; /* Support for SSL */
|
||||
@@ -2134,7 +2134,7 @@ retry1:
|
||||
|
||||
#ifdef ENABLE_GSS
|
||||
/* No GSSAPI encryption when on Unix socket */
|
||||
if (!IS_AF_UNIX(port->laddr.addr.ss_family))
|
||||
if (port->laddr.addr.ss_family != AF_UNIX)
|
||||
GSSok = 'G';
|
||||
#endif
|
||||
|
||||
|
||||
Reference in New Issue
Block a user