pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Christian Kastner <debian@kvr.at>
To: pgsql-bugs@postgresql.org
Subject: Possible regression: libpq + SSL aborts when user has no home directory
Date: Thu, 03 Mar 2011 20:47:42 +0100
Message-ID: <4D6FF05E.1050201@kvr.at> (raw)

Using libpq 9.0.3, when an SSL connection is attempted from a client
whose EUID is not in a password database, the connection fails because
the home directory cannot be determined. With libpq 8.4.7, everything is
fine.

I encountered this issue on my mail host, where I use virtual users.
When mail is delivered, parameters such as UID, home directory, etc. are
retrieved using multiple queries against a Postgres DB.

As soon as the virtual user's UID (which does not exist in any local
password database) is determined, exim setuid()s to it. All further
queries then fail with an error similar to this one:

PGSQL connection failed: could not get home directory to locate client
certificate files
FATAL: no pg_hba.conf entry for host "1.2.3.4", user "exim4", database
"fake_name", SSL off

Looking at interfaces/libpq/fe-secure.c, it seems that such a failure
previously only occurred when sslmode was "verify-*", otherwise the
missing home dir was ignored. Now, it always fails.

It was pointed out to me that the client-side SSL stuff changed in
9.0.3, so this might be entirely valid. I was just a little suprising.


Regards,
Christian



view thread (7+ messages)  latest in thread

Message-ID: <4D6FF05E.1050201@kvr.at>
Permalink:  ../4D6FF05E.1050201@kvr.at/
Also on:    postgresql.org/message-id/4D6FF05E.1050201@kvr.at

 · 

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-bugs@postgresql.org
  Cc: debian@kvr.at
  Subject: Re: Possible regression: libpq + SSL aborts when user has no home directory
  In-Reply-To: <4D6FF05E.1050201@kvr.at>
  References: <4D6FF05E.1050201@kvr.at>

* 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