X-Git-Url: http://git.madism.org/?a=blobdiff_plain;ds=sidebyside;f=mh.c;h=ab75d5296b9b57d4d88ed1f27265aa212d826d55;hb=68a299bc56c990b4833db762e43ce0021d323d25;hp=3a29cce56f3ea0a4ee0751b62f6decdf4ea565d0;hpb=ce2c6b74b93777c66708ef0cfb7cc14ff1bf6a94;p=apps%2Fmadmutt.git diff --git a/mh.c b/mh.c index 3a29cce..ab75d52 100644 --- a/mh.c +++ b/mh.c @@ -192,7 +192,8 @@ static int mh_mkstemp (CONTEXT * dest, FILE ** fp, char **tgt) { 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) { if (errno != EEXIST) { @@ -1080,7 +1081,8 @@ int maildir_open_new_message (MESSAGE * msg, CONTEXT * dest, HEADER * hdr) 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) { if (errno != EEXIST) {