[glom] Revert "SelfHosting: Do not generate and specify pg_ident.conf"
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [glom] Revert "SelfHosting: Do not generate and specify pg_ident.conf"
- Date: Tue, 30 Oct 2012 16:58:38 +0000 (UTC)
commit 9ae7b3f8e8f74269f7c2c5cb9e72bc1331865494
Author: Murray Cumming <murrayc murrayc com>
Date: Mon Oct 29 08:36:21 2012 +0100
Revert "SelfHosting: Do not generate and specify pg_ident.conf"
This reverts commit f39fa95fc4881871c2c162dffc63c2d8e45e55f7.
Because we probably do need this with unix-socket domains, which
I am bringing back.
ChangeLog | 8 --------
.../connectionpool_backends/postgres_self.cc | 5 +++++
2 files changed, 5 insertions(+), 8 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 682b449..2062b09 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,13 +1,5 @@
2012-10-25 Murray Cumming <murrayc murrayc com>
- SelfHosting: Do not generate and specify pg_ident.conf
-
- * glom/libglom/connectionpool_backends/postgres_self.cc:
- Do not bother creating and using the pg_ident.conf file because
- we do not use ident authentication.
-
-2012-10-25 Murray Cumming <murrayc murrayc com>
-
Self hosting: Only allow attempts from localhost when not shared.
* glom/libglom/connectionpool_backends/postgres_self.cc:
diff --git a/glom/libglom/connectionpool_backends/postgres_self.cc b/glom/libglom/connectionpool_backends/postgres_self.cc
index 7bb5ed5..2afb7f3 100644
--- a/glom/libglom/connectionpool_backends/postgres_self.cc
+++ b/glom/libglom/connectionpool_backends/postgres_self.cc
@@ -422,12 +422,14 @@ Backend::StartupErrors PostgresSelfHosted::startup(const SlotProgress& slot_prog
// CreateProcess() API used on Windows does not support single quotes.
const std::string dbdir_config = Glib::build_filename(dbdir, "config");
const std::string dbdir_hba = Glib::build_filename(dbdir_config, "pg_hba.conf");
+ const std::string dbdir_ident = Glib::build_filename(dbdir_config, "pg_ident.conf");
const std::string dbdir_pid = Glib::build_filename(dbdir, "pid");
const std::string listen_address = (m_network_shared ? "*" : "localhost");
const std::string command_postgres_start = get_path_to_postgres_executable("postgres") + " -D " + Glib::shell_quote(dbdir_data)
+ " -p " + port_as_text
+ " -h " + listen_address
+ " -c hba_file=" + Glib::shell_quote(dbdir_hba)
+ + " -c ident_file=" + Glib::shell_quote(dbdir_ident)
// This seems to be a way to disable unix sockets.
// See http://archives.postgresql.org/pgsql-general/2012-10/msg00727.php
@@ -590,6 +592,9 @@ bool PostgresSelfHosted::set_network_shared(const SlotProgress& slot_progress, b
if(!hba_conf_creation_succeeded)
return false;
+ const bool ident_conf_creation_succeeded = create_text_file(dbdir_uri_config + "/pg_ident.conf", DEFAULT_CONFIG_PG_IDENT);
+ g_assert(ident_conf_creation_succeeded);
+
return hba_conf_creation_succeeded;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]