Update all copyright messages to cover 1995 - 2009. Remove tab from exim_checkaccess.src
[exim.git] / src / src / transports / tf_maildir.c
index 26c999b0ce761a4697a961049b92bbe715cf5809..7411d9a3e735b807e82ed1079d8704cfe2e1e72e 100644 (file)
@@ -1,10 +1,10 @@
-/* $Cambridge: exim/src/src/transports/tf_maildir.c,v 1.11 2008/05/16 12:02:19 nm4 Exp $ */
+/* $Cambridge: exim/src/src/transports/tf_maildir.c,v 1.14 2009/11/16 19:56:54 nm4 Exp $ */
 
 /*************************************************
 *     Exim - an Internet mail transport agent    *
 *************************************************/
 
-/* Copyright (c) University of Cambridge 1995 - 2007 */
+/* Copyright (c) University of Cambridge 1995 - 2009 */
 /* See the file NOTICE for conditions of use and distribution. */
 
 /* Functions in support of the use of maildirsize files for handling quotas in
@@ -392,7 +392,7 @@ the same thing. */
 filename = string_sprintf("%s/maildirsize", path);
 
 DEBUG(D_transport) debug_printf("looking for maildirsize in %s\n", path);
-fd = Uopen(filename, O_RDWR|O_APPEND, 0600);
+fd = Uopen(filename, O_RDWR|O_APPEND, ob->mode ? ob->mode : 0600);
 if (fd < 0)
   {
   if (errno != ENOENT) return -1;
@@ -559,7 +559,7 @@ else
   tempname = string_sprintf("%s/tmp/%lu.H%luP%lu.%s", path, tv.tv_sec,
     tv.tv_usec, getpid(), primary_hostname);
 
-  fd = Uopen(tempname, O_RDWR|O_CREAT|O_EXCL, 0600);
+  fd = Uopen(tempname, O_RDWR|O_CREAT|O_EXCL, ob->mode ? ob->mode : 0600);
   if (fd >= 0)
     {
     (void)sprintf(CS buffer, OFF_T_FMT "S,%dC\n" OFF_T_FMT " %d\n",