Check configure file permissions even for non-default files if still privileged
[exim.git] / src / src / readconf.c
index 08030583409e77ffeedbd66ffd6a718e41b3d4c2..118ccf5feb6e68de64df20a4aab24aa0a0a953a4 100644 (file)
@@ -2874,10 +2874,10 @@ else
       "configuration file %s", filename));
   }
 
-/* Check the status of the file we have opened, unless it was specified on
-the command line, in which case privilege was given away at the start. */
+/* Check the status of the file we have opened, if we have retained root
+privileges. */
 
-if (!config_changed)
+if (trusted_config)
   {
   if (fstat(fileno(config_file), &statbuf) != 0)
     log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to stat configuration file %s",