git://git.exim.org
/
exim.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8de97e5
)
Logging: specific error for tainted tag in debug filename
author
Jeremy Harris
<jgh146exb@wizmail.org>
Thu, 19 Aug 2021 10:23:08 +0000
(11:23 +0100)
committer
Jeremy Harris
<jgh146exb@wizmail.org>
Thu, 19 Aug 2021 10:23:08 +0000
(11:23 +0100)
src/src/log.c
patch
|
blob
|
history
diff --git
a/src/src/log.c
b/src/src/log.c
index 1b77f98fa235f9570a3030fee656a2253831d6de..a7ef3d803b3bac362101523581cd7744b428eb95 100644
(file)
--- a/
src/src/log.c
+++ b/
src/src/log.c
@@
-518,6
+518,10
@@
switch (type)
Ustrcpy(debuglog_name, buffer);
if (tag)
{
Ustrcpy(debuglog_name, buffer);
if (tag)
{
+ if (is_tainted(tag))
+ die(US"exim: tainted tag for debug log filename",
+ US"Logging failure; please try later");
+
/* this won't change the offset of the datestamp */
ok2 = string_format(buffer, sizeof(buffer), "%s%s",
debuglog_name, tag);
/* this won't change the offset of the datestamp */
ok2 = string_format(buffer, sizeof(buffer), "%s%s",
debuglog_name, tag);
@@
-558,9
+562,7
@@
if (!ok)
/* We now have the file name. After a successful open, return. */
/* We now have the file name. After a successful open, return. */
-*fd = log_open_as_exim(buffer);
-
-if (*fd >= 0)
+if ((*fd = log_open_as_exim(buffer)) >= 0)
return;
euid = geteuid();
return;
euid = geteuid();