From: Jeremy Harris Date: Mon, 30 Sep 2024 10:11:43 +0000 (+0100) Subject: More detail in file open-fail log line X-Git-Url: https://git.exim.org/exim.git/commitdiff_plain/4d756df0d59a0dfa02d453ae3dd666e180e6fbfc More detail in file open-fail log line --- diff --git a/src/src/expand.c b/src/src/expand.c index e1e6e1999..bb51bf10c 100644 --- a/src/src/expand.c +++ b/src/src/expand.c @@ -8786,8 +8786,8 @@ int fd, off = 0, len; if ((fd = exim_open2(CS filename, O_RDONLY)) < 0) { - log_write(0, LOG_MAIN | LOG_PANIC, "unable to open file for reading: %s", - filename); + log_write(0, LOG_MAIN | LOG_PANIC, "unable to open file '%s' for reading: %s", + filename, strerror(errno)); return NULL; } @@ -8956,7 +8956,7 @@ if (opt_perl_startup != NULL) uschar *errstr; printf("Starting Perl interpreter\n"); errstr = init_perl(opt_perl_startup); - if (errstr != NULL) + if (errstr) { printf("** error in perl_startup code: %s\n", errstr); return EXIT_FAILURE; diff --git a/src/src/functions.h b/src/src/functions.h index 875ce25a6..c9bb8cd70 100644 --- a/src/src/functions.h +++ b/src/src/functions.h @@ -1270,7 +1270,7 @@ if (f.running_in_test_harness && f.testsuite_delays) millisleep(millisec); } /******************************************************************************/ -/* Taint-checked file opens */ +/* Taint-checked file opens. Return values/errno per open(2). */ static inline int exim_open2(const char *pathname, int flags)