Received: from localhost (postgresql.org [64.49.215.8]) by postgresql.org (Postfix) with ESMTP id E6504476225 for ; Mon, 23 Dec 2002 17:27:57 -0500 (EST) Received: from candle.pha.pa.us (momjian.navpoint.com [207.106.42.251]) by postgresql.org (Postfix) with ESMTP id 6E4E84761F8 for ; Mon, 23 Dec 2002 17:27:56 -0500 (EST) Received: (from pgman@localhost) by candle.pha.pa.us (8.11.6/8.10.1) id gBNMRhH00527; Mon, 23 Dec 2002 17:27:43 -0500 (EST) From: Bruce Momjian Message-Id: <200212232227.gBNMRhH00527@candle.pha.pa.us> Subject: Re: SSL Mode In-Reply-To: <200212231842.gBNIgRo02712@candle.pha.pa.us> To: Bruce Momjian Date: Mon, 23 Dec 2002 17:27:43 -0500 (EST) Cc: Dan Langille , Tom Lane , Rob Abernethy IV , postgresql X-Mailer: ELM [version 2.4ME+ PL99 (25)] MIME-Version: 1.0 Content-Type: multipart/mixed; boundary=ELM1040682463-13274-0_ Content-Transfer-Encoding: 7bit X-Virus-Scanned: by AMaViS new-20020517 X-Archive-Number: 200212/287 X-Sequence-Number: 6782 --ELM1040682463-13274-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=US-ASCII 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" 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 --ELM1040682463-13274-0_ Content-Transfer-Encoding: 7bit Content-Type: text/plain Content-Disposition: inline; filename="/bjm/diff" 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)) --ELM1040682463-13274-0_--