summaryrefslogtreecommitdiffstats
path: root/debian/patches/51-default-sockets-in-var.patch
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:20 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-04 12:19:20 +0000
commit983ee639b550634d447cd203c4644705f1a8b471 (patch)
tree5f499905dc2dbbf1625be1afc09d14f0e96c4b14 /debian/patches/51-default-sockets-in-var.patch
parentAdding upstream version 13.4. (diff)
downloadpostgresql-13-983ee639b550634d447cd203c4644705f1a8b471.tar.xz
postgresql-13-983ee639b550634d447cd203c4644705f1a8b471.zip
Adding debian version 13.4-3.debian/13.4-3debian
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/patches/51-default-sockets-in-var.patch')
-rw-r--r--debian/patches/51-default-sockets-in-var.patch20
1 files changed, 20 insertions, 0 deletions
diff --git a/debian/patches/51-default-sockets-in-var.patch b/debian/patches/51-default-sockets-in-var.patch
new file mode 100644
index 0000000..5ea8488
--- /dev/null
+++ b/debian/patches/51-default-sockets-in-var.patch
@@ -0,0 +1,20 @@
+Author: Martin Pitt <mpitt@debian.org>
+Description: Put server Unix sockets into /var/run/postgresql/ by default
+Forwarded: No, Debian specific configuration with postgresql-common
+
+Using /tmp for sockets allows everyone to spoof a PostgreSQL server. Thus use
+/var/run/postgresql/ for "system" clusters which run as 'postgres' (user
+clusters will still use /tmp). Since system cluster are by far the common case,
+set it as default.
+
+--- a/src/include/pg_config_manual.h
++++ b/src/include/pg_config_manual.h
+@@ -201,7 +201,7 @@
+ * support them yet.
+ */
+ #ifndef WIN32
+-#define DEFAULT_PGSOCKET_DIR "/tmp"
++#define DEFAULT_PGSOCKET_DIR "/var/run/postgresql"
+ #else
+ #define DEFAULT_PGSOCKET_DIR ""
+ #endif