X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fsrc%2Fdirectory.c;h=3273eb89b066a23f8ed35dbc7f7f0b3f4e5434f0;hb=a746f186fdd8b3b6561919177b6dd011c2b177e4;hp=2d4d565f4ede31504743571a5b1ded263d0ebc42;hpb=b66fecb428871a3eb274d9370671f1eaf8c5ccec;p=user%2Fhenk%2Fcode%2Fexim.git diff --git a/src/src/directory.c b/src/src/directory.c index 2d4d565f4..3273eb89b 100644 --- a/src/src/directory.c +++ b/src/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); @@ -85,7 +88,7 @@ return TRUE; 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; }