summaryrefslogtreecommitdiffstats
path: root/debian/patches/75_11-directory.patch
blob: 4c3a68418c0b39cf08065e7e22d141897c5c4888 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
From 5f41e800ce9cc7ad154047298914df955e905bf4 Mon Sep 17 00:00:00 2001
From: "Heiko Schlittermann (HS12-RIPE)" <hs@schlittermann.de>
Date: Thu, 1 Apr 2021 21:28:59 +0200
Subject: [PATCH 11/23] directory

---
 src/directory.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/directory.c b/src/directory.c
index 2d4d565f4..9f88f4141 100644
--- a/src/directory.c
+++ b/src/directory.c
@@ -44,6 +44,9 @@ uschar c = 1;
 struct stat statbuf;
 uschar * path;
 
+if (is_tainted2(name, LOG_MAIN|LOG_PANIC, "Tainted path '%s' for new directory", name))
+  { p = US"create"; path = US name; errno = EACCES; goto bad; }
+
 if (parent)
   {
   path = string_sprintf("%s%s%s", parent, US"/", name);
-- 
2.30.2