Skip to content
Snippets Groups Projects
Commit 572d9515 authored by Bruce Momjian's avatar Bruce Momjian
Browse files

Update SSL error message for improper permissions. Backpatch to 7.3.X.

parent 3daad2ae
No related branches found
No related tags found
No related merge requests found
...@@ -11,7 +11,7 @@ ...@@ -11,7 +11,7 @@
* *
* *
* IDENTIFICATION * IDENTIFICATION
* $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.20 2002/12/18 13:15:12 pgsql Exp $ * $Header: /cvsroot/pgsql/src/backend/libpq/be-secure.c,v 1.21 2002/12/23 22:19:00 momjian Exp $
* *
* Since the server static private key ($DataDir/server.key) * Since the server static private key ($DataDir/server.key)
* will normally be stored unencrypted so that the database * will normally be stored unencrypted so that the database
...@@ -616,7 +616,9 @@ initialize_SSL(void) ...@@ -616,7 +616,9 @@ initialize_SSL(void)
if (!S_ISREG(buf.st_mode) || (buf.st_mode & 0077) || if (!S_ISREG(buf.st_mode) || (buf.st_mode & 0077) ||
buf.st_uid != getuid()) buf.st_uid != getuid())
{ {
postmaster_error("bad permissions on private key file (%s)", fnbuf); 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); ExitPostmaster(1);
} }
if (!SSL_CTX_use_PrivateKey_file(SSL_context, fnbuf, SSL_FILETYPE_PEM)) if (!SSL_CTX_use_PrivateKey_file(SSL_context, fnbuf, SSL_FILETYPE_PEM))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment