[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r112027: * movemail.c: Don't grant mo
From: |
Paul Eggert |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r112027: * movemail.c: Don't grant more read permissions than necessary. |
Date: |
Tue, 12 Mar 2013 18:05:40 -0700 |
User-agent: |
Bazaar (2.5.0) |
------------------------------------------------------------
revno: 112027
committer: Paul Eggert <address@hidden>
branch nick: trunk
timestamp: Tue 2013-03-12 18:05:40 -0700
message:
* movemail.c: Don't grant more read permissions than necessary.
The old 0333 dates back to before we called setuid,
so it was needed back then to ensure user-readability,
but 0377 should suffice now.
modified:
lib-src/ChangeLog
lib-src/movemail.c
=== modified file 'lib-src/ChangeLog'
--- a/lib-src/ChangeLog 2013-03-13 00:54:47 +0000
+++ b/lib-src/ChangeLog 2013-03-13 01:05:40 +0000
@@ -2,6 +2,10 @@
* movemail.c (main): Call umask on all systems.
This is OK since Emacs already assumes umask elsewhere.
+ Don't grant more read permissions than necessary.
+ The old 0333 dates back to before we called setuid,
+ so it was needed back then to ensure user-readability,
+ but 0377 should suffice now.
2013-02-08 Paul Eggert <address@hidden>
=== modified file 'lib-src/movemail.c'
--- a/lib-src/movemail.c 2013-03-13 00:54:47 +0000
+++ b/lib-src/movemail.c 2013-03-13 01:05:40 +0000
@@ -380,9 +380,9 @@
if (indesc < 0)
pfatal_with_name (inname);
- /* In case movemail is setuid to root, make sure the user can
- read the output file. */
- umask (umask (0) & 0333);
+ /* Make sure the user can read the output file. */
+ umask (umask (0) & 0377);
+
outdesc = open (outname, O_WRONLY | O_CREAT | O_EXCL, 0666);
if (outdesc < 0)
pfatal_with_name (outname);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r112027: * movemail.c: Don't grant more read permissions than necessary.,
Paul Eggert <=