[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows)
From: |
Gaëtan LEURENT |
Subject: |
Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows) |
Date: |
Fri, 24 Jun 2005 17:07:57 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.0.50 (usg-unix-v) |
Juanma Barranquero wrote on 24 Jun 2005 11:08:20 +0200:
> 2005-06-23 Richard M. Stallman <address@hidden>
>
> * 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
Re: Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows), Richard M. Stallman, 2005/06/26
Re: Race-condition ? (was: "Preserve owner and group" on MSDOS/Windows), Richard M. Stallman, 2005/06/26