From: Paul Eggert Date: Wed, 13 Mar 2013 00:54:47 +0000 (-0700) Subject: * movemail.c (main): Call umask on all systems. X-Git-Url: http://git.hcoop.net/bpt/emacs.git/commitdiff_plain/f58afc72bd0fd54189c2ca66b9907ca0d338de75 * movemail.c (main): Call umask on all systems. This is OK since Emacs already assumes umask elsewhere. --- diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 81876d8616..9900f385ce 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog @@ -1,3 +1,8 @@ +2013-03-13 Paul Eggert + + * movemail.c (main): Call umask on all systems. + This is OK since Emacs already assumes umask elsewhere. + 2013-02-08 Paul Eggert * movemail.c (getenv): Remove decl (unused since 1994). diff --git a/lib-src/movemail.c b/lib-src/movemail.c index cf93fb78d9..386e28de71 100644 --- a/lib-src/movemail.c +++ b/lib-src/movemail.c @@ -380,13 +380,9 @@ main (int argc, char **argv) if (indesc < 0) pfatal_with_name (inname); -#ifdef BSD_SYSTEM /* In case movemail is setuid to root, make sure the user can read the output file. */ - /* This is desirable for all systems - but I don't want to assume all have the umask system call */ umask (umask (0) & 0333); -#endif /* BSD_SYSTEM */ outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666); if (outdesc < 0) pfatal_with_name (outname);