mirror of
https://github.com/postgres/postgres.git
synced 2025-07-28 23:42:10 +03:00
A bit of cleanup after SSL patch. Add it to config file, improve
documentation.
This commit is contained in:
@ -11,7 +11,7 @@
|
||||
*
|
||||
*
|
||||
* IDENTIFICATION
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.165 2000/09/06 14:15:19 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/postmaster/postmaster.c,v 1.166 2000/09/06 19:54:46 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
*
|
||||
@ -193,10 +193,8 @@ static bool Reinit = true;
|
||||
static int SendStop = false;
|
||||
|
||||
bool NetServer = false; /* listen on TCP/IP */
|
||||
bool EnableSSL = false;
|
||||
|
||||
#ifdef USE_SSL
|
||||
static bool DisableSSL = false; /* Completely disable SSL, even if compiled in */
|
||||
#endif
|
||||
|
||||
static pid_t StartupPID = 0,
|
||||
ShutdownPID = 0;
|
||||
@ -452,7 +450,7 @@ PostmasterMain(int argc, char *argv[])
|
||||
break;
|
||||
#ifdef USE_SSL
|
||||
case 'l':
|
||||
DisableSSL = true;
|
||||
EnableSSL = true;
|
||||
break;
|
||||
#endif
|
||||
case 'm':
|
||||
@ -563,13 +561,13 @@ PostmasterMain(int argc, char *argv[])
|
||||
}
|
||||
|
||||
#ifdef USE_SSL
|
||||
if (!NetServer && !DisableSSL)
|
||||
if (EnableSSL && !NetServer)
|
||||
{
|
||||
fprintf(stderr, "%s: For SSL, you must enable TCP/IP connections. Use -l to disable SSL\n",
|
||||
fprintf(stderr, "%s: For SSL, TCP/IP connections must be enabled. See -? for help.\n",
|
||||
progname);
|
||||
exit(1);
|
||||
}
|
||||
if (!DisableSSL)
|
||||
if (EnableSSL)
|
||||
InitSSL();
|
||||
#endif
|
||||
|
||||
@ -750,9 +748,9 @@ usage(const char *progname)
|
||||
printf(" -d 1-5 debugging level\n");
|
||||
printf(" -D <directory> database directory\n");
|
||||
printf(" -F turn fsync off\n");
|
||||
printf(" -i listen on TCP/IP sockets\n");
|
||||
printf(" -i enable TCP/IP connections\n");
|
||||
#ifdef USE_SSL
|
||||
printf(" -l disable SSL\n");
|
||||
printf(" -l enable SSL connections\n");
|
||||
#endif
|
||||
printf(" -N <number> maximum number of allowed connections (1..%d, default %d)\n",
|
||||
MAXBACKENDS, DEF_MAXBACKENDS);
|
||||
@ -1060,7 +1058,7 @@ readStartupPacket(void *arg, PacketLen len, void *pkt)
|
||||
char SSLok;
|
||||
|
||||
#ifdef USE_SSL
|
||||
if (DisableSSL || port->laddr.sa.sa_family != AF_INET)
|
||||
if (!EnableSSL || port->laddr.sa.sa_family != AF_INET)
|
||||
/* No SSL when disabled or on Unix sockets */
|
||||
SSLok = 'N';
|
||||
else
|
||||
|
@ -4,7 +4,7 @@
|
||||
* Support for grand unified configuration scheme, including SET
|
||||
* command, configuration file, and command line options.
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.10 2000/08/28 11:57:41 petere Exp $
|
||||
* $Header: /cvsroot/pgsql/src/backend/utils/misc/guc.c,v 1.11 2000/09/06 19:54:47 petere Exp $
|
||||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
* Written by Peter Eisentraut <peter_e@gmx.net>.
|
||||
@ -160,6 +160,7 @@ ConfigureNamesBool[] =
|
||||
{"geqo", PGC_USERSET, &enable_geqo, true},
|
||||
|
||||
{"tcpip_socket", PGC_POSTMASTER, &NetServer, false},
|
||||
{"ssl", PGC_POSTMASTER, &EnableSSL, false},
|
||||
{"fsync", PGC_USERSET, &enableFsync, true},
|
||||
|
||||
{"log_connections", PGC_SIGHUP, &Log_connections, false},
|
||||
|
@ -3,7 +3,7 @@
|
||||
*
|
||||
* Copyright 2000 by PostgreSQL Global Development Group
|
||||
*
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.35 2000/08/30 14:54:23 momjian Exp $
|
||||
* $Header: /cvsroot/pgsql/src/bin/psql/startup.c,v 1.36 2000/09/06 19:54:48 petere Exp $
|
||||
*/
|
||||
#include "postgres.h"
|
||||
|
||||
@ -264,12 +264,13 @@ main(int argc, char *argv[])
|
||||
"Type: \\copyright for distribution terms\n"
|
||||
" \\h for help with SQL commands\n"
|
||||
" \\? for help on internal slash commands\n"
|
||||
" \\g or terminate with semicolon to execute query\n"
|
||||
" \\g or terminate with semicolon to execute query\n"
|
||||
" \\q to quit\n\n", pset.progname);
|
||||
}
|
||||
#ifdef USE_SSL
|
||||
printSSLInfo();
|
||||
printSSLInfo();
|
||||
#endif
|
||||
}
|
||||
|
||||
SetVariable(pset.vars, "PROMPT1", DEFAULT_PROMPT1);
|
||||
SetVariable(pset.vars, "PROMPT2", DEFAULT_PROMPT2);
|
||||
SetVariable(pset.vars, "PROMPT3", DEFAULT_PROMPT3);
|
||||
|
@ -12,7 +12,7 @@
|
||||
* Portions Copyright (c) 1996-2000, PostgreSQL, Inc
|
||||
* Portions Copyright (c) 1994, Regents of the University of California
|
||||
*
|
||||
* $Id: miscadmin.h,v 1.65 2000/09/06 14:15:24 petere Exp $
|
||||
* $Id: miscadmin.h,v 1.66 2000/09/06 19:54:52 petere Exp $
|
||||
*
|
||||
* NOTES
|
||||
* some of the information in this file will be moved to
|
||||
@ -107,6 +107,7 @@ extern int SortMem;
|
||||
configuration file processor has access to them */
|
||||
|
||||
extern bool NetServer;
|
||||
extern bool EnableSSL;
|
||||
extern int MaxBackends;
|
||||
extern int NBuffers;
|
||||
extern int PostPortName;
|
||||
|
Reference in New Issue
Block a user