[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: creating backups in temporary directories
From: |
Richard Stallman |
Subject: |
Re: creating backups in temporary directories |
Date: |
Tue, 11 Sep 2007 16:32:04 -0400 |
This of course applies to the backup-by-copying case too: then just open
/tmp/foo~ with O_EXCL when performing the copy, with /tmp/randomfile~ and
"you have enemies" if it fails.
The code in backup-buffer-copy already does part of this;
it calls copy-file in a way that uses O_EXCL.
If /tmp/foo~ already exists, rename it first to /tmp/backupforthebackup~
rather than unlinking it; we have to get it out of the way and use O_EXCL
even if we own it in case the directory's owner is the attacker.
Why is this needed? When we're doing the copy, the actual source file
also exists.
- Re: creating backups in temporary directories, (continued)
- Re: creating backups in temporary directories, Richard Stallman, 2007/09/08
- Re: creating backups in temporary directories, Stefan Monnier, 2007/09/07
- Re: creating backups in temporary directories, Richard Stallman, 2007/09/08
- Re: creating backups in temporary directories, Stefan Monnier, 2007/09/09
- Re: creating backups in temporary directories, David Kastrup, 2007/09/09
- Re: creating backups in temporary directories, Andreas Schwab, 2007/09/09
- Re: creating backups in temporary directories, David Kastrup, 2007/09/09
- Re: creating backups in temporary directories, Davis Herring, 2007/09/10
- Re: creating backups in temporary directories, David Kastrup, 2007/09/10
- Message not available
- Re: creating backups in temporary directories, Davis Herring, 2007/09/10
- Re: creating backups in temporary directories,
Richard Stallman <=
- Re: creating backups in temporary directories, Davis Herring, 2007/09/11
- Re: creating backups in temporary directories, Richard Stallman, 2007/09/09
- Re: creating backups in temporary directories, Stefan Monnier, 2007/09/09
- Re: creating backups in temporary directories, Davis Herring, 2007/09/07
- Re: creating backups in temporary directories, Chris Moore, 2007/09/08
- Re: creating backups in temporary directories, Richard Stallman, 2007/09/08
- Re: creating backups in temporary directories, Stefan Monnier, 2007/09/09
- Re: creating backups in temporary directories, David Kastrup, 2007/09/09
- Re: creating backups in temporary directories, Richard Stallman, 2007/09/09