unofficial mirror of notmuch@notmuchmail.org
 help / color / mirror / code / Atom feed
* [PATCH] cli/insert: new message file can be world-readable (rely on umask)
@ 2018-02-05  4:37 Daniel Kahn Gillmor
  2018-02-05 11:59 ` Peter Wang
  0 siblings, 1 reply; 10+ messages in thread
From: Daniel Kahn Gillmor @ 2018-02-05  4:37 UTC (permalink / raw)
  To: Notmuch Mail

There are legitimate cases (public archives) where a user might
actually want their archive to be readable to the world.

"notmuch insert" historically used mode 0600 (unreadable by group or
other), but that choice doesn't appear to have been specifically
justified (perhaps an abundance of caution?).

If the user wants "notmuch insert" to create files that are not
readable by group or other, they can set their umask more
restrictively.
---
 notmuch-insert.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/notmuch-insert.c b/notmuch-insert.c
index 48490b51..167005db 100644
--- a/notmuch-insert.c
+++ b/notmuch-insert.c
@@ -227,7 +227,7 @@ maildir_mktemp (const void *ctx, const char *maildir, char **path_out)
 	    return -1;
 	}
 
-	fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0600);
+	fd = open (path, O_WRONLY | O_CREAT | O_TRUNC | O_EXCL, 0644);
     } while (fd == -1 && errno == EEXIST);
 
     if (fd == -1) {
-- 
2.15.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2018-03-24 23:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-02-05  4:37 [PATCH] cli/insert: new message file can be world-readable (rely on umask) Daniel Kahn Gillmor
2018-02-05 11:59 ` Peter Wang
2018-02-06 19:43   ` [PATCH v2] " Daniel Kahn Gillmor
2018-02-09  1:40     ` Daniel Kahn Gillmor
2018-02-09  1:52       ` Brian Sniffen
2018-02-09  2:33         ` Daniel Kahn Gillmor
2018-02-09  2:00       ` Daniel Kahn Gillmor
2018-02-09  4:10       ` [PATCH v3] cli/insert: add --world-readable flag Daniel Kahn Gillmor
2018-02-15  6:08         ` Tomi Ollila
2018-03-24 23:17         ` David Bremner

Code repositories for project(s) associated with this public inbox

	https://yhetil.org/notmuch.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).