diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-29 19:26:52 +0000 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2009-08-29 19:26:52 +0000 |
commit | e710b65c1c56ca7b91f662c63d37ff2e72862a94 (patch) | |
tree | 35f0571a317a0f6d9a0e50a84d7d4157a811807d /src/backend/utils/init/flatfiles.c | |
parent | 585806cb9fa0deeec94c8d76c20316ad0dfdd7eb (diff) | |
download | postgresql-e710b65c1c56ca7b91f662c63d37ff2e72862a94.tar.gz postgresql-e710b65c1c56ca7b91f662c63d37ff2e72862a94.zip |
Remove the use of the pg_auth flat file for client authentication.
(That flat file is now completely useless, but removal will come later.)
To do this, postpone client authentication into the startup transaction
that's run by InitPostgres. We still collect the startup packet and do
SSL initialization (if needed) at the same time we did before. The
AuthenticationTimeout is applied separately to startup packet collection
and the actual authentication cycle. (This is a bit annoying, since it
means a couple extra syscalls; but the signal handling requirements inside
and outside a transaction are sufficiently different that it seems best
to treat the timeouts as completely independent.)
A small security disadvantage is that if the given database name is invalid,
this will be reported to the client before any authentication happens.
We could work around that by connecting to database "postgres" instead,
but consensus seems to be that it's not worth introducing such surprising
behavior.
Processing of all command-line switches and GUC options received from the
client is now postponed until after authentication. This means that
PostAuthDelay is much less useful than it used to be --- if you need to
investigate problems during InitPostgres you'll have to set PreAuthDelay
instead. However, allowing an unauthenticated user to set any GUC options
whatever seems a bit too risky, so we'll live with that.
Diffstat (limited to 'src/backend/utils/init/flatfiles.c')
-rw-r--r-- | src/backend/utils/init/flatfiles.c | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/backend/utils/init/flatfiles.c b/src/backend/utils/init/flatfiles.c index 5a9c8bd47b3..fbbd372b141 100644 --- a/src/backend/utils/init/flatfiles.c +++ b/src/backend/utils/init/flatfiles.c @@ -23,7 +23,7 @@ * Portions Copyright (c) 1996-2009, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * - * $PostgreSQL: pgsql/src/backend/utils/init/flatfiles.c,v 1.37 2009/08/12 20:53:30 tgl Exp $ + * $PostgreSQL: pgsql/src/backend/utils/init/flatfiles.c,v 1.38 2009/08/29 19:26:51 tgl Exp $ * *------------------------------------------------------------------------- */ @@ -825,11 +825,6 @@ AtEOXact_UpdateFlatFiles(bool isCommit) } /* - * Signal the postmaster to reload its caches. - */ - SendPostmasterSignal(PMSIGNAL_PASSWORD_CHANGE); - - /* * Force synchronous commit, to minimize the window between changing the * flat files on-disk and marking the transaction committed. It's not * great that there is any window at all, but definitely we don't want to |