all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: gaetan.leurent@ens.fr (Gaëtan LEURENT)
Subject: Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows)
Date: Fri, 24 Jun 2005 17:07:57 +0200	[thread overview]
Message-ID: <qlkbr5vdc8i.fsf@clipper.ens.fr> (raw)
In-Reply-To: <f7ccd24b05062402087cf11dd5@mail.gmail.com> (Juanma Barranquero's message of "Fri, 24 Jun 2005 11:08:20 +0200")


Juanma Barranquero wrote on 24 Jun 2005 11:08:20 +0200:

> 2005-06-23  Richard M. Stallman  <rms@gnu.org>
>
> 	* fileio.c (Frename_file): Preserve owner and group, if possible,
> 	when copying.

This is done with a call to chown, and I think this is a source of
race-conditions, like the one that was recently discovered in bzip2
(someone could have replaced the file by a link to another file between
Fcopy_file and chown).

I believe we should use fchown instead.

In fileio.c there is also a call to chmod in copy-file which seem to
suffer the same problem. This one is also in emacs 21.4.

I think lisp calls to set-file-modes should also be checked carefully.

-- 
Gaëtan LEURENT

  parent reply	other threads:[~2005-06-24 15:07 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-06-24  9:08 "Preserve owner and group" on MSDOS/Windows Juanma Barranquero
2005-06-24 11:45 ` Eli Zaretskii
2005-06-24 11:02   ` Juanma Barranquero
2005-06-24 15:07 ` Gaëtan LEURENT [this message]
2005-06-24 20:07   ` Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows) Eli Zaretskii
2005-06-24 20:46     ` Race-condition ? Gaëtan LEURENT
2005-06-25  9:27       ` Eli Zaretskii
2005-06-24 21:01     ` David Kastrup
2005-06-25 22:25       ` Gaëtan LEURENT
2005-06-26 18:48         ` David Kastrup
2005-06-26  4:46   ` Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows) Richard M. Stallman
2005-06-26 19:52     ` Race-condition ? Gaëtan LEURENT
2005-06-27  5:38       ` Richard M. Stallman
2005-06-28 22:57         ` Gaëtan LEURENT
2005-06-28 23:50           ` Lennart Borgman
2005-06-30  5:42             ` David Kastrup
2005-07-03 15:49           ` Richard M. Stallman
2005-06-26  4:46   ` Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows) Richard M. Stallman
2005-06-26 17:12     ` Race-condition ? Gaëtan LEURENT
2005-06-26 18:59     ` Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows) Eli Zaretskii

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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=qlkbr5vdc8i.fsf@clipper.ens.fr \
    --to=gaetan.leurent@ens.fr \
    --cc=emacs-devel@gnu.org \
    /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 external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.