[exim-cvs] Let /dev/null have normal permissions.

Góra strony
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Dla: exim-cvs
Temat: [exim-cvs] Let /dev/null have normal permissions.
Gitweb: http://git.exim.org/exim.git/commitdiff/fea24b2ea4e2c2a4b77d6fb222054e32e658b227
Commit:     fea24b2ea4e2c2a4b77d6fb222054e32e658b227
Parent:     eec525c43adade97ff94d839810faf7cb35bd87f
Author:     Phil Pennock <pdp@???>
AuthorDate: Sun Jan 16 21:54:53 2011 -0500
Committer:  Phil Pennock <pdp@???>
CommitDate: Sun Jan 16 21:56:06 2011 -0500


    Let /dev/null have normal permissions.


    The 4.73 fixes were a little too stringent and complained about the
    permissions on /dev/null.  Exempt it from some checks.
    Reported by Andreas M. Kirchwitz
---
 doc/doc-txt/ChangeLog |    5 +++++
 src/src/readconf.c    |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)


diff --git a/doc/doc-txt/ChangeLog b/doc/doc-txt/ChangeLog
index e27496b..0780fc7 100644
--- a/doc/doc-txt/ChangeLog
+++ b/doc/doc-txt/ChangeLog
@@ -22,6 +22,11 @@ PP/01 Bugzilla 139: Documentation and portability issues.
       Avoid GNU Makefile-isms, let Exim continue to build on BSD.
       Handle per-OS dynamic-module compilation flags.


+PP/02 Let /dev/null have normal permissions.
+      The 4.73 fixes were a little too stringent and complained about the
+      permissions on /dev/null.  Exempt it from some checks.
+      Reported by Andreas M. Kirchwitz.
+


Exim version 4.73
-----------------
diff --git a/src/src/readconf.c b/src/src/readconf.c
index 118ccf5..0b78958 100644
--- a/src/src/readconf.c
+++ b/src/src/readconf.c
@@ -2875,9 +2875,9 @@ else
}

/* Check the status of the file we have opened, if we have retained root
-privileges. */
+privileges and the file isn't /dev/null (which *should* be 0666). */

-if (trusted_config)
+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",