Testsuite: OpenSSL version output variances
[exim.git] / src / src / directory.c
index d6cac2cb8096d6dce6042890f6203054bee17bba..5c55a4524b66e8a4baff930898a0b137830c7b2b 100644 (file)
@@ -1,5 +1,3 @@
-/* $Cambridge: exim/src/src/directory.c,v 1.6 2009/11/16 19:50:36 nm4 Exp $ */
-
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
@@ -76,7 +74,12 @@ while (c != 0 && *p != 0)
 
     /* Set the ownership if necessary. */
 
-    if (use_chown) (void)Uchown(buffer, exim_uid, exim_gid);
+    if (use_chown && Uchown(buffer, exim_uid, exim_gid))
+      {
+      if (!panic) return FALSE;
+      log_write(0, LOG_MAIN|LOG_PANIC_DIE,
+        "Failed to set owner on directory \"%s\": %s\n", buffer, strerror(errno));
+      }
 
     /* It appears that any mode bits greater than 0777 are ignored by
     mkdir(), at least on some operating systems. Therefore, if the mode