aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Eggert2013-03-12 17:54:47 -0700
committerPaul Eggert2013-03-12 17:54:47 -0700
commitf58afc72bd0fd54189c2ca66b9907ca0d338de75 (patch)
tree26668eb79ed48d148c12ad1f61b6526fdac73aed
parent5615c9a9af487c19ab0bd30cb15d7bdb9af53560 (diff)
downloademacs-f58afc72bd0fd54189c2ca66b9907ca0d338de75.tar.gz
emacs-f58afc72bd0fd54189c2ca66b9907ca0d338de75.zip
* movemail.c (main): Call umask on all systems.
This is OK since Emacs already assumes umask elsewhere.
-rw-r--r--lib-src/ChangeLog5
-rw-r--r--lib-src/movemail.c4
2 files changed, 5 insertions, 4 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 81876d86165..9900f385ce9 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,8 @@
12013-03-13 Paul Eggert <eggert@cs.ucla.edu>
2
3 * movemail.c (main): Call umask on all systems.
4 This is OK since Emacs already assumes umask elsewhere.
5
12013-02-08 Paul Eggert <eggert@cs.ucla.edu> 62013-02-08 Paul Eggert <eggert@cs.ucla.edu>
2 7
3 * movemail.c (getenv): Remove decl (unused since 1994). 8 * movemail.c (getenv): Remove decl (unused since 1994).
diff --git a/lib-src/movemail.c b/lib-src/movemail.c
index cf93fb78d98..386e28de711 100644
--- a/lib-src/movemail.c
+++ b/lib-src/movemail.c
@@ -380,13 +380,9 @@ main (int argc, char **argv)
380 if (indesc < 0) 380 if (indesc < 0)
381 pfatal_with_name (inname); 381 pfatal_with_name (inname);
382 382
383#ifdef BSD_SYSTEM
384 /* In case movemail is setuid to root, make sure the user can 383 /* In case movemail is setuid to root, make sure the user can
385 read the output file. */ 384 read the output file. */
386 /* This is desirable for all systems
387 but I don't want to assume all have the umask system call */
388 umask (umask (0) & 0333); 385 umask (umask (0) & 0333);
389#endif /* BSD_SYSTEM */
390 outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666); 386 outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666);
391 if (outdesc < 0) 387 if (outdesc < 0)
392 pfatal_with_name (outname); 388 pfatal_with_name (outname);