dbstuff
authorHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Sun, 28 Mar 2021 08:49:49 +0000 (10:49 +0200)
committerHeiko Schlittermann (HS12-RIPE) <hs@schlittermann.de>
Wed, 16 Jun 2021 20:30:34 +0000 (22:30 +0200)
(cherry picked from commit 35b11dd0e52b5ac176849f807cca8898bcaf0c3d)

src/src/dbstuff.h

index 8a8a5fb67e19858e877b3959e22f1ea2ba406984..2f00dffb42d9c09c046b3ad8abb5818d522457ff 100644 (file)
@@ -640,11 +640,9 @@ after reading data. */
       : (flags) == O_RDWR ? "O_RDWR"   \
       : (flags) == (O_RDWR|O_CREAT) ? "O_RDWR|O_CREAT" \
       : "??"); \
-  if (is_tainted(name) || is_tainted(dirname)) \
-    { \
-    log_write(0, LOG_MAIN|LOG_PANIC, "Tainted name for DB file not permitted"); \
+  if (is_tainted2(name, LOG_MAIN|LOG_PANIC, "Tainted name '%s' for DB file not permitted", name) \
+      || is_tainted2(dirname, LOG_MAIN|LOG_PANIC, "Tainted name '%s' for DB directory not permitted", dirname)) \
     *dbpp = NULL; \
-    } \
   else \
     { EXIM_DBOPEN__(name, dirname, flags, mode, dbpp); } \
   DEBUG(D_hints_lookup) debug_printf_indent("returned from EXIM_DBOPEN: %p\n", *dbpp); \