pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Peter Eisentraut <peter@eisentraut.org>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: Sort out getpeereid() and peer auth handling on Windows
Date: Mon, 16 Dec 2019 08:53:43 +0000
Message-ID: <E1igm8N-0004us-8A@gemulon.postgresql.org> (raw)

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f14413b684d57211068ee56ee04695efcc87a23a

Modified Files
--------------
configure                         | 36 +++++++++++++++---------------------
configure.in                      | 11 ++++-------
src/backend/libpq/auth.c          | 17 ++++++++---------
src/include/port.h                |  2 +-
src/interfaces/libpq/fe-connect.c | 10 +++++++---
src/tools/msvc/Mkvcbuild.pm       |  2 +-
6 files changed, 36 insertions(+), 42 deletions(-)



Message-ID: <E1igm8N-0004us-8A@gemulon.postgresql.org>
Permalink:  ../E1igm8N-0004us-8A@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1igm8N-0004us-8A@gemulon.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-committers@postgresql.org
  Cc: peter@eisentraut.org
  Subject: Re: pgsql: Sort out getpeereid() and peer auth handling on Windows
  In-Reply-To: <E1igm8N-0004us-8A@gemulon.postgresql.org>
  References: <E1igm8N-0004us-8A@gemulon.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox