Don't panic if the attempt to create the spool directory fails and the
authorPhilip Hazel <ph10@hermes.cam.ac.uk>
Tue, 23 Aug 2005 10:29:10 +0000 (10:29 +0000)
committerPhilip Hazel <ph10@hermes.cam.ac.uk>
Tue, 23 Aug 2005 10:29:10 +0000 (10:29 +0000)
error isn't "already exists". Needed for the new test suite.

doc/doc-txt/ChangeLog
src/src/exim.c

index 2b51e62f254dc30bb9ee3a07d7c930bd0c57dcae..31789929dd06c3cc5940661bcae29279d3def489 100644 (file)
@@ -1,4 +1,4 @@
-$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.209 2005/08/23 08:46:33 ph10 Exp $
+$Cambridge: exim/doc/doc-txt/ChangeLog,v 1.210 2005/08/23 10:29:10 ph10 Exp $
 
 Change log file for Exim from version 4.21
 -------------------------------------------
 
 Change log file for Exim from version 4.21
 -------------------------------------------
@@ -114,6 +114,11 @@ PH/26 Exim was recognizing IPv6 addresses of the form [IPv6:....] in EHLO
 
 PH/27 Added the % operator to ${eval:}.
 
 
 PH/27 Added the % operator to ${eval:}.
 
+PH/28 Exim tries to create and chdir to its spool directory when it starts;
+      it should be ignoring failures (because with -C, for example, it has lost
+      privilege). It wasn't ignoring creation failures other than "already
+      exists".
+
 
 Exim version 4.52
 -----------------
 
 Exim version 4.52
 -----------------
index 06e01399a5755e5d37b09dd11243224a8fe42fae..8ed39d654c9e8d4797fbffd9b7f48ffdbaa91533 100644 (file)
@@ -1,4 +1,4 @@
-/* $Cambridge: exim/src/src/exim.c,v 1.24 2005/08/09 13:31:52 ph10 Exp $ */
+/* $Cambridge: exim/src/src/exim.c,v 1.25 2005/08/23 10:29:10 ph10 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
@@ -3300,11 +3300,12 @@ if (((debug_selector & D_any) != 0 || (log_extra_selector & LX_arguments) != 0)
 on this in the code, which always uses fully qualified names, but it's useful
 for core dumps etc. Don't complain if it fails - the spool directory might not
 be generally accessible and calls with the -C option (and others) have lost
 on this in the code, which always uses fully qualified names, but it's useful
 for core dumps etc. Don't complain if it fails - the spool directory might not
 be generally accessible and calls with the -C option (and others) have lost
-privilege by now. */
+privilege by now. Before the chdir, we try to ensure that the directory exists.
+*/
 
 if (Uchdir(spool_directory) != 0)
   {
 
 if (Uchdir(spool_directory) != 0)
   {
-  (void)directory_make(spool_directory, US"", SPOOL_DIRECTORY_MODE, TRUE);
+  (void)directory_make(spool_directory, US"", SPOOL_DIRECTORY_MODE, FALSE);
   (void)Uchdir(spool_directory);
   }
 
   (void)Uchdir(spool_directory);
   }