More detail in file open-fail log line master
authorJeremy Harris <jgh146exb@wizmail.org>
Mon, 30 Sep 2024 10:11:43 +0000 (11:11 +0100)
committerJeremy Harris <jgh146exb@wizmail.org>
Mon, 30 Sep 2024 10:11:43 +0000 (11:11 +0100)
src/src/expand.c
src/src/functions.h

index e1e6e199925d22131e88d0e6a34be7afc8b93d02..bb51bf10ca0a6fb6573f51f5f52cb17a4b5e8626 100644 (file)
@@ -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;
index 875ce25a638ca15ac69d92b053deb1f3d580c782..c9bb8cd700b27a592d305119b5588fa010de5ce7 100644 (file)
@@ -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)