[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: creating backups in temporary directories
From: |
David Kastrup |
Subject: |
Re: creating backups in temporary directories |
Date: |
Sun, 09 Sep 2007 22:01:55 +0200 |
User-agent: |
Gnus/5.11 (Gnus v5.11) Emacs/22.1.50 (gnu/linux) |
Stefan Monnier <address@hidden> writes:
> In a directory with mode 777, that's true: everything is dangerous.
> But in a directory with mode 1777 when you open a file that *you* own,
> nobody else can remove it or rename it, so normally nobody can replace it
> with a symlink. Emacs creates the problem when it moves /tmp/foo to
> /tmp/foo~ at which point /tmp/foo is free for an attacker to take.
Well, the alternative is to make a hard link of /tmp/foo to /tmp/foo~,
then creat /tmp/foo over it and fill it with contents without
reopening.
That should close the time window for an attack.
Anyway, using O_CREAT|O_EXCL when opening refuses to go through
symbolic links.
So we should have a few options available for avoiding problems.
--
David Kastrup, Kriemhildstr. 15, 44793 Bochum
- creating backups in temporary directories, Chris Moore, 2007/09/07
- Re: creating backups in temporary directories, David Kastrup, 2007/09/07
- Re: creating backups in temporary directories, Stefan Monnier, 2007/09/07
- 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 <=
- 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, 2007/09/11
- 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