Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id BC4771337BC9 for ; Fri, 4 Mar 2011 10:55:56 -0400 (AST) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 16686-07 for ; Fri, 4 Mar 2011 14:55:48 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from sss.pgh.pa.us (sss.pgh.pa.us [66.207.139.130]) by mail.postgresql.org (Postfix) with ESMTP id 131941337BB9 for ; Fri, 4 Mar 2011 10:55:45 -0400 (AST) Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id p24EtZEV027205; Fri, 4 Mar 2011 09:55:35 -0500 (EST) To: Magnus Hagander cc: Christian Kastner , pgsql-bugs@postgresql.org Subject: Re: Possible regression: libpq + SSL aborts when user has no home directory In-reply-to: References: <4D6FF05E.1050201@kvr.at> <8295.1299189555@sss.pgh.pa.us> <10824.1299196694@sss.pgh.pa.us> Comments: In-reply-to Magnus Hagander message dated "Fri, 04 Mar 2011 08:21:53 +0100" Date: Fri, 04 Mar 2011 09:55:35 -0500 Message-ID: <27204.1299250535@sss.pgh.pa.us> From: Tom Lane X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.91 tagged_above=-5 required=5 tests=BAYES_00=-1.9, T_RP_MATCHES_RCVD=-0.01 X-Spam-Level: X-Archive-Number: 201103/103 X-Sequence-Number: 29613 Magnus Hagander writes: > On Fri, Mar 4, 2011 at 00:58, Tom Lane wrote: >>> One small problem is that if the sslmode is "verify-ca" or >>> "verify-full", failure to find the root cert file is an error, >>> and that error message normally includes the pathname at which >>> the cert file was sought.  What shall we print if we couldn't >>> identify the home directory? > Is there any case when it would actually be realistic that we don't > find the home directory, but the user can't figure out that's why it > couldn't find the file? If so, the "could not get home directory" adds > some more information... We can't exactly expect the end user to know > that this is the only codepath that can lead to the error message... Yeah, after sleeping on it I think that it'd be better to have a specialized error message for this case. It's not significantly more code, but it would represent another translatable string, and I had first thought that dodging that would be good. But it's a sufficiently odd case that making the error message as explicit as possible is probably the best thing. Will change and commit. regards, tom lane