[exim-cvs] Enforce pid_file_path start at "/"

Top Page
Delete this message
Reply to this message
Author: Exim Git Commits Mailing List
Date:  
To: exim-cvs
Subject: [exim-cvs] Enforce pid_file_path start at "/"
Gitweb: https://git.exim.org/exim.git/commitdiff/cdee66a2abd6e3f2da6efc36f8efd4b5dd46ce4c
Commit:     cdee66a2abd6e3f2da6efc36f8efd4b5dd46ce4c
Parent:     9175da81c45d627e0da6c473a802202056c3d28b
Author:     Heiko Schlittermann (HS12-RIPE) <hs@???>
AuthorDate: Thu Mar 18 07:59:21 2021 +0100
Committer:  Heiko Schlittermann (HS12-RIPE) <hs@???>
CommitDate: Thu May 27 21:30:19 2021 +0200


    Enforce pid_file_path start at "/"


    (cherry picked from commit 60f2a8e797d9ebaea1e3eac4ad28ff64e11bab40)
    (cherry picked from commit 6b3d553c733475a1033c8b7a241e6506d7ed73b1)
---
 doc/doc-txt/ChangeLog | 2 ++
 src/src/daemon.c      | 3 +++
 2 files changed, 5 insertions(+)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index df6efee..d66dc64 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -252,6 +252,8 @@ JH/53 Bug 2743: fix immediate-delivery via named queue.  Previously this would
       fail with a taint-check on the spoolfile name, and leave the message
       queued.


+HS/01 Enforce absolute PID file path name.
+

Exim version 4.94
-----------------
diff --git a/src/src/daemon.c b/src/src/daemon.c
index c9e6f33..0b39fd5 100644
--- a/src/src/daemon.c
+++ b/src/src/daemon.c
@@ -939,6 +939,9 @@ if (override_pid_file_path)

if (!*pid_file_path)
pid_file_path = string_sprintf("%s/exim-daemon.pid", spool_directory);
+
+if (pid_file_path[0] != '/')
+ log_write(0, LOG_PANIC_DIE, "pid file path %s must be absolute\n", pid_file_path);
}