From: Glenn Morris <rgm@gnu.org>
To: markd@soe.ucsc.edu
Cc: 6953@debbugs.gnu.org
Subject: bug#6953: 24.0.50; serious security bug in create backup files
Date: Thu, 02 Sep 2010 03:58:26 -0400 [thread overview]
Message-ID: <mkhbi8d1b1.fsf@fencepost.gnu.org> (raw)
In-Reply-To: <19583.19642.954872.847808@bugle.cse.ucsc.edu> (markd@soe.ucsc.edu's message of "Thu\, 2 Sep 2010 00\:05\:30 -0700")
markd@soe.ucsc.edu wrote:
> Oh, wait, it doesn't look like there is a problem with your patch,
> only the comment ;-) backup-buffer-copy says:
>
> ;; Create temp files with strict access rights. It's easy to
> ;; loosen them later, whereas it's impossible to close the
> ;; time-window of loose permissions otherwise.
I don't know what this comment means. There are no "temp files" AFAICS
(unless copy-file creates some internally). I think this comment may
be a leftover from when this code used write-region rather than
copy-file. Indeed the whole mode-changing bit may be as well. C-h f
copy-file says: "This function always sets the file modes of the
output file to match the input file."
Eg:
touch ~/1
chmod 644 ~/1
(set-default-file-modes ?\700)
(copy-file "~/1" "~/2" t t t)
ls -l ~/2 # -> world readable
next prev parent reply other threads:[~2010-09-02 7:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-08-31 6:13 bug#6953: 24.0.50; serious security bug in create backup files Mark Diekhans
2010-09-02 5:38 ` Glenn Morris
2010-09-02 6:54 ` Eli Zaretskii
2010-09-02 7:05 ` markd
2010-09-02 7:58 ` Glenn Morris [this message]
2010-09-02 16:33 ` Mark Diekhans
2010-09-08 0:03 ` Glenn Morris
2010-09-08 8:52 ` Stefan Monnier
2010-09-08 15:48 ` Glenn Morris
2010-09-08 22:48 ` Stefan Monnier
2010-09-09 5:28 ` Glenn Morris
2010-09-09 17:09 ` Stefan Monnier
2010-09-10 3:06 ` Glenn Morris
2010-09-13 11:44 ` Eli Zaretskii
2010-09-13 15:32 ` Lennart Borgman
2010-09-22 1:34 ` Glenn Morris
2010-09-25 20:21 ` Chong Yidong
2010-09-26 10:37 ` Richard Stallman
2010-09-28 17:26 ` Chong Yidong
2010-09-29 13:36 ` Richard Stallman
2010-09-29 13:43 ` Eli Zaretskii
2010-09-29 14:25 ` markd
2011-01-12 4:38 ` Glenn Morris
2011-01-12 15:25 ` Stefan Monnier
2011-01-12 17:56 ` Mark Diekhans
2011-01-12 19:29 ` Glenn Morris
2011-01-12 21:56 ` Mark Diekhans
2011-01-15 2:33 ` Chong Yidong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=mkhbi8d1b1.fsf@fencepost.gnu.org \
--to=rgm@gnu.org \
--cc=6953@debbugs.gnu.org \
--cc=markd@soe.ucsc.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.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).