File: 51-default-sockets-in-var.patch

package info (click to toggle)
postgresql-15 15.13-0%2Bdeb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 166,512 kB
  • sloc: ansic: 899,752; sql: 109,423; perl: 42,533; yacc: 36,866; xml: 31,046; lex: 8,906; makefile: 6,175; sh: 4,842; cpp: 1,105; python: 151; asm: 65; sed: 16
file content (20 lines) | stat: -rw-r--r-- 708 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
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