emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: unicode build: "comparison is always true" warnings


From: Matthieu Lemerre
Subject: Re: unicode build: "comparison is always true" warnings
Date: Sat, 24 Nov 2007 12:23:22 +0100
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.1 (gnu/linux)

Andreas Schwab <address@hidden> writes:
>
> In which way it is different from what mkstemp is doing?
>

When you use mktemp, you have to use two operations:
1/Create a file name with mktemp
2/Open it

An attacker could create a symlink with this name file between these
two operations, thus the file would be erased.

mkstemp guarantees these two operations to be done atomically by the
kernel (and the kernel chooses a name corresponding to an unused file
name), so the race condition does not work in that case; the file
descriptor is guaranteed to always correspond to a new file.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]