postgresql/src
Peter Eisentraut f14413b684 Sort out getpeereid() and peer auth handling on Windows
The getpeereid() uses have so far been protected by HAVE_UNIX_SOCKETS,
so they didn't ever care about Windows support.  But in anticipation
of Unix-domain socket support on Windows, that needs to be handled
differently.

Windows doesn't support getpeereid() at this time, so we use the
existing not-supported code path.  We let configure do its usual thing
of picking up the replacement from libpgport, instead of the custom
overrides that it was doing before.

But then Windows doesn't have struct passwd, so this patch sprinkles
some additional #ifdef WIN32 around to make it work.  This is similar
to existing code that deals with this issue.

Reviewed-by: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Discussion: https://www.postgresql.org/message-id/5974caea-1267-7708-40f2-6009a9d653b0@2ndquadrant.com
2019-12-16 09:36:08 +01:00
..
backend Sort out getpeereid() and peer auth handling on Windows 2019-12-16 09:36:08 +01:00
bin Modernize our readline API a tad. 2019-12-13 11:16:33 -05:00
common Fix output of Unicode normalization test 2019-12-11 08:42:17 +01:00
fe_utils Refactor query cancellation code into src/fe_utils/ 2019-12-02 11:18:56 +09:00
include Sort out getpeereid() and peer auth handling on Windows 2019-12-16 09:36:08 +01:00
interfaces Sort out getpeereid() and peer auth handling on Windows 2019-12-16 09:36:08 +01:00
makefiles Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
pl Add backend-only appendStringInfoStringQuoted 2019-12-10 17:12:56 -03:00
port Remove useless "return;" lines 2019-11-28 16:48:37 -03:00
template Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
test Clean up some misplaced comments in partition_join.sql regression test. 2019-12-16 17:00:15 +09:00
timezone Split all OBJS style lines in makefiles into one-line-per-entry style. 2019-11-05 14:41:07 -08:00
tools Sort out getpeereid() and peer auth handling on Windows 2019-12-16 09:36:08 +01:00
tutorial Add .gitignore to src/tutorial/ 2019-11-22 21:14:54 +09:00
.gitignore
DEVELOPERS
Makefile Fix partial-build problems introduced by having more generated headers. 2018-04-09 16:42:10 -04:00
Makefile.global.in Select CFLAGS_SL at configure time, not in platform-specific Makefiles. 2019-10-21 12:32:35 -04:00
Makefile.shlib Clean up MinGW def file generation 2019-10-20 10:19:13 +02:00
nls-global.mk NLS: Fix backend gettext triggers 2019-09-23 09:04:20 +02:00