]> git.netwichtig.de Git - user/henk/code/exim.git/blobdiff - src/src/readconf.c
Tests compat. setgid failure / dropped_privilege
[user/henk/code/exim.git] / src / src / readconf.c
index 08030583409e77ffeedbd66ffd6a718e41b3d4c2..0b78958e4f0e6222bca6c3dea52bc851f0a8b231 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 and the file isn't /dev/null (which *should* be 0666). */
 
-if (!config_changed)
+if (trusted_config && Ustrcmp(filename, US"/dev/null"))
   {
   if (fstat(fileno(config_file), &statbuf) != 0)
     log_write(0, LOG_MAIN|LOG_PANIC_DIE, "failed to stat configuration file %s",