mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
* movemail.c (main): Call umask on all systems.
This is OK since Emacs already assumes umask elsewhere.
This commit is contained in:
parent
5615c9a9af
commit
f58afc72bd
2 changed files with 5 additions and 4 deletions
|
|
@ -1,3 +1,8 @@
|
|||
2013-03-13 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* movemail.c (main): Call umask on all systems.
|
||||
This is OK since Emacs already assumes umask elsewhere.
|
||||
|
||||
2013-02-08 Paul Eggert <eggert@cs.ucla.edu>
|
||||
|
||||
* movemail.c (getenv): Remove decl (unused since 1994).
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue