[exim-dev] [Bug 437] New: maildirfolder_create_regex create …

Pàgina inicial
Delete this message
Reply to this message
Autor: bug437
Data:  
A: exim-dev
Assumpte: [exim-dev] [Bug 437] New: maildirfolder_create_regex create files with mode 0000
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

http://www.exim.org/bugzilla/show_bug.cgi?id=437

           Summary: maildirfolder_create_regex create files with mode 0000
           Product: Exim
           Version: 4.63
          Platform: Other
        OS/Version: Linux
            Status: NEW
          Keywords: work:tiny
          Severity: bug
          Priority: medium
         Component: Transports
        AssignedTo: ph10@???
        ReportedBy: stefan@???
         QAContact: exim-dev@???



in src/transports/tf_maildir.c around line 172 (4.63 tarball) we have:

int fd = Uopen(fname, O_WRONLY|O_APPEND|O_CREAT, 0);

which results in maildirfolder files created with a mode of 0000 which is not
really a good idea(probably a c&p error) - we have fixed that locally witha
crude hack - but i guess it should actually respect the "mode" set in the
transport.


    163   if (pcre_exec(regex, NULL, CS path, Ustrlen(path), 0, 0, NULL, 0) >=
0)
    164     {
    165     uschar *fname = string_sprintf("%s/maildirfolder", path);
    166     if (Ustat(fname, &statbuf) == 0)
    167       {
    168       DEBUG(D_transport) debug_printf("maildirfolder already
exists\n");
    169       }
    170     else
    171       {
    172       int fd = Uopen(fname, O_WRONLY|O_APPEND|O_CREAT, 0);
    173       if (fd < 0)
    174         {
    175         addr->message = string_sprintf("appendfile: failed to create "
    176           "maildirfolder file in %s directory: %s", path,
strerror(errno));
    177         return FALSE;
    178         }
    179       (void)close(fd);
    180       DEBUG(D_transport) debug_printf("created maildirfolder file\n");
    181       }
    182     }
    183   else
    184     {
    185     DEBUG(D_transport) debug_printf("maildirfolder file not
required\n");
    186     }
    187   }


--
Configure bugmail: http://www.exim.org/bugzilla/userprefs.cgi?tab=email