diff options
author | Bruce Momjian <bruce@momjian.us> | 2001-07-30 14:50:24 +0000 |
---|---|---|
committer | Bruce Momjian <bruce@momjian.us> | 2001-07-30 14:50:24 +0000 |
commit | 462b7d46d1feaf6a43a77bc8470a387316c02997 (patch) | |
tree | dc31011bee25ca8d2f93859971cec2b4a09f2481 /src/backend/tcop/postgres.c | |
parent | 8d464d05d72c88a516994e2fa6d35d751163fe97 (diff) | |
download | postgresql-462b7d46d1feaf6a43a77bc8470a387316c02997.tar.gz postgresql-462b7d46d1feaf6a43a77bc8470a387316c02997.zip |
Load pg_hba.conf and pg_ident.conf on startup and SIGHUP into List of
Lists, and use that for user validation.
Bruce Momjian
Diffstat (limited to 'src/backend/tcop/postgres.c')
-rw-r--r-- | src/backend/tcop/postgres.c | 25 |
1 files changed, 18 insertions, 7 deletions
diff --git a/src/backend/tcop/postgres.c b/src/backend/tcop/postgres.c index acf89356e80..0de677a9442 100644 --- a/src/backend/tcop/postgres.c +++ b/src/backend/tcop/postgres.c @@ -8,7 +8,7 @@ * * * IDENTIFICATION - * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.227 2001/06/29 16:05:56 tgl Exp $ + * $Header: /cvsroot/pgsql/src/backend/tcop/postgres.c,v 1.228 2001/07/30 14:50:24 momjian Exp $ * * NOTES * this is the "main" module of the postgres backend and @@ -1120,7 +1120,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha unsigned short remote_port; char *potential_DataDir = NULL; - + /* * Catch standard options before doing much else. This even works on * systems without getopt_long. @@ -1144,16 +1144,27 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha * * If we are running under the postmaster, this is done already. */ - if (!IsUnderPostmaster) + if (IsUnderPostmaster) + { + MemoryContextSwitchTo(TopMemoryContext); + ClientAuthentication(MyProcPort); /* might not return */ + /* + * Release postmaster's working memory context so that backend can + * recycle the space. Note this does not trash *MyProcPort, because + * ConnCreate() allocated that space with malloc() ... else we'd need + * to copy the Port data here. We delete it here because the + * authorization file tokens are stored in this context. + */ + MemoryContextDelete(PostmasterContext); + PostmasterContext = NULL; + } + else { SetProcessingMode(InitProcessing); EnableExceptionHandling(true); MemoryContextInit(); } - if (IsUnderPostmaster) - ClientAuthentication(MyProcPort); /* might not return */ - /* * Set default values for command-line options. */ @@ -1714,7 +1725,7 @@ PostgresMain(int argc, char *argv[], int real_argc, char *real_argv[], const cha if (!IsUnderPostmaster) { puts("\nPOSTGRES backend interactive interface "); - puts("$Revision: 1.227 $ $Date: 2001/06/29 16:05:56 $\n"); + puts("$Revision: 1.228 $ $Date: 2001/07/30 14:50:24 $\n"); } /* |