honor umask also for Maildir.
git-svn-id: svn://svn.berlios.de/mutt-ng/trunk@32
e385b8ad-14ed-0310-8656-
cc95a2468c6d
struct stat osb, nsb;
int fd;
struct stat osb, nsb;
int fd;
- if ((fd = open (path, flags, 0600)) < 0)
+ umask(Umask);
+ if ((fd = open (path, flags, 0666)) < 0)
return fd;
/* make sure the file is not symlink */
return fd;
/* make sure the file is not symlink */
{
snprintf (path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%d",
dest->path, NONULL (Hostname), (int) getpid (), Counter++);
{
snprintf (path, _POSIX_PATH_MAX, "%s/.mutt-%s-%d-%d",
dest->path, NONULL (Hostname), (int) getpid (), Counter++);
- if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1)
+ umask(Umask);
+ if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)
dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
path));
dprint (2, (debugfile, "maildir_open_new_message (): Trying %s.\n",
path));
- if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0600)) == -1)
+ umask(Umask);
+ if ((fd = open (path, O_WRONLY | O_EXCL | O_CREAT, 0666)) == -1)