struct stat statbuf;
uschar * path;
+if (is_tainted(name))
+ { p = US"create"; path = US name; errno = ERRNO_TAINT; goto bad; }
+
if (parent)
{
path = string_sprintf("%s%s%s", parent, US"/", name);
bad:
if (panic) log_write(0, LOG_MAIN|LOG_PANIC_DIE,
- "Failed to %s directory \"%s\": %s\n", p, path, strerror(errno));
+ "Failed to %s directory \"%s\": %s\n", p, path, exim_errstr(errno));
return FALSE;
}
{
uschar * dest_qname = queue_name_dest ? queue_name_dest : queue_name;
+/* Since we are working within the spool, de-taint the dest queue name */
+dest_qname = string_copy_taint(dest_qname, FALSE);
+
/* Create any output directories that do not exist. */
(void) directory_make(spool_directory,