bug-coreutils
[Top][All Lists]
Advanced

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

Re: address@hidden: Re: file permissions race in mkdir, mknod, mkfifo (C


From: Paul Eggert
Subject: Re: address@hidden: Re: file permissions race in mkdir, mknod, mkfifo (CAN-2005-1039)]
Date: Sat, 26 Aug 2006 14:45:24 -0700
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Martin Pitt <address@hidden> writes:

> I do not see the issue for mkfifo -- what can possibly go wrong with
> open()ing and fchmod()ing a freshly created FIFO?

If mkfifo opens the FIFO for reading, and some other process then
opens the FIFO for writing without O_NONBLOCK, the other process will
assume that the FIFO is ready for business and has a reader, even
though it doesn't really.

Anyway, this issue is no longer relevant for mkfifo or mknod.
coreutils 6.1 mkfifo does not use chmod (or fchmod or lchmod or
whatever).  So its mkfifo is "safe" (in the sense described in the
original bug report), and the patch is irrelevant for it.  Likewise
for mknod.  Only mkdir is still "unsafe".




reply via email to

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