From: Alvaro Herrera <alvherre@2ndquadrant.com>
To: Bruce Momjian <bruce@momjian.us>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: nicolas@marchildon.net
Cc: pgsql-bugs@postgresql.org
Subject: Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd
Date: Wed, 4 Dec 2013 16:03:39 -0300
Message-ID: <20131204190338.GP5158@eldon.alvh.no-ip.org> (raw)
In-Reply-To: <20131204155257.GD17114@momjian.us>
References: <E1UZk2V-0005oP-Eh@wrigleys.postgresql.org>
<296.1367950228@sss.pgh.pa.us>
<20130507181904.GA26800@eldon.alvh.no-ip.org>
<20131204155257.GD17114@momjian.us>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Bruce Momjian wrote:
> On Tue, May 7, 2013 at 02:19:05PM -0400, Alvaro Herrera wrote:
> I have developed the attached patch to fix this and another instance I
> saw.
Remember to set errno = 0 before calling the getpw* function; at least
in initdb it would be meaningful. And in the pg_upgrade case, it seems
better to abort the upgrade if this call doesn't work. (Also, there are
other uses of getpwuid/getpwnam elsewhere. Not sure we want to worry
too much about them.)
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-bugs mailing list (pgsql-bugs@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs
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: alvherre@2ndquadrant.com, bruce@momjian.us, tgl@sss.pgh.pa.us, nicolas@marchildon.net
Subject: Re: BUG #8139: initdb: Misleading error message when current user not in /etc/passwd
In-Reply-To: <20131204190338.GP5158@eldon.alvh.no-ip.org>
References: <E1UZk2V-0005oP-Eh@wrigleys.postgresql.org> <296.1367950228@sss.pgh.pa.us> <20130507181904.GA26800@eldon.alvh.no-ip.org> <20131204155257.GD17114@momjian.us> <20131204190338.GP5158@eldon.alvh.no-ip.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