From: Bruce Momjian <pgman@candle.pha.pa.us>
To: Bruce Momjian <pgman@candle.pha.pa.us>
Cc: Dan Langille <dan@langille.org>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Rob Abernethy IV <abernethy@dynedge.com>
Cc: postgresql <pgsql-admin@postgresql.org>
Subject: Re: SSL Mode
Date: Mon, 23 Dec 2002 17:27:43 -0500 (EST)
Message-ID: <200212232227.gBNMRhH00527@candle.pha.pa.us> (raw)
In-Reply-To: <200212231842.gBNIgRo02712@candle.pha.pa.us>
Patch attached. Will appear in 7.3.2 and 7.4.
---------------------------------------------------------------------------
Bruce Momjian wrote:
> Dan Langille wrote:
> > On Mon, 23 Dec 2002, Tom Lane wrote:
> >
> > > "Rob Abernethy IV" <abernethy@dynedge.com> writes:
> > > > I cannot get the postmaster to start up in SSL mode. I receive the following
> > > > error:
> > > > bad permissions on private key file (/var/lib/pgsql/data/server.key)
> > >
> > > > -rw-r--r-- 1 postgres postgres 3223 Dec 18 17:10 server.crt
> > > > -rw-r--r-- 1 postgres postgres 887 Dec 18 17:10 server.key
> > >
> > > I think it wants the private key file to be mode 600 or less --- a
> > > world-readable private key isn't very private, hmm?
> >
> > Is this a good candidate for error message improvement?
>
> Yes. I will take care of it.
>
> --
> Bruce Momjian | http://candle.pha.pa.us
> pgman@candle.pha.pa.us | (610) 359-1001
> + If your life is a hard drive, | 13 Roberts Road
> + Christ can be your backup. | Newtown Square, Pennsylvania 19073
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org
>
--
Bruce Momjian | http://candle.pha.pa.us
pgman@candle.pha.pa.us | (610) 359-1001
+ If your life is a hard drive, | 13 Roberts Road
+ Christ can be your backup. | Newtown Square, Pennsylvania 19073
Attachments:/bjm/diff (text/plain, 1.0K) download
Index: src/backend/libpq/be-secure.c
===================================================================
RCS file: /cvsroot/pgsql-server/src/backend/libpq/be-secure.c,v
retrieving revision 1.20
diff -c -c -r1.20 be-secure.c
*** src/backend/libpq/be-secure.c 18 Dec 2002 13:15:12 -0000 1.20
--- src/backend/libpq/be-secure.c 23 Dec 2002 22:13:12 -0000
***************
*** 616,622 ****
if (!S_ISREG(buf.st_mode) || (buf.st_mode & 0077) ||
buf.st_uid != getuid())
{
! postmaster_error("bad permissions on private key file (%s)", fnbuf);
ExitPostmaster(1);
}
if (!SSL_CTX_use_PrivateKey_file(SSL_context, fnbuf, SSL_FILETYPE_PEM))
--- 616,624 ----
if (!S_ISREG(buf.st_mode) || (buf.st_mode & 0077) ||
buf.st_uid != getuid())
{
! postmaster_error("bad permissions on private key file (%s)\n"
! "File must be owned by the proper user and must have no permissions for\n"
! "\"group\" or \"other\".", fnbuf);
ExitPostmaster(1);
}
if (!SSL_CTX_use_PrivateKey_file(SSL_context, fnbuf, SSL_FILETYPE_PEM))
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-admin@postgresql.org
Cc: pgman@candle.pha.pa.us, dan@langille.org, tgl@sss.pgh.pa.us, abernethy@dynedge.com
Subject: Re: SSL Mode
In-Reply-To: <200212232227.gBNMRhH00527@candle.pha.pa.us>
References: <200212231842.gBNIgRo02712@candle.pha.pa.us> <200212232227.gBNMRhH00527@candle.pha.pa.us>
* 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