You run your program, but I have created a simlink in /tmp with the
same name (because the name is guessable). That is a race because it
relies on contention between two processes (my "ln -s" and your broken
program) over a shared resource (the easily-guessable name in the
shared namespace of the filesystem). This is the definition of a
race. You may not call it that, but everyone else would.
> Ofcourse there are security implications of handling files in /tmp, but
> that is independent of how the filenames are generated and a completely
> different story. A program that relies on non-guessable filenames in
> /tmp to be secure is severly broken.
Agreed.
Sean
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/