[prev in list] [next in list] [prev in thread] [next in thread] 

List:       coreutils-bug
Subject:    Re: [eggert@CS.UCLA.EDU: Re: file permissions race in mkdir, mknod,
From:       Paul Eggert <eggert () CS ! UCLA ! EDU>
Date:       2006-08-26 21:45:24
Message-ID: 87d5anmarv.fsf () penguin ! cs ! ucla ! edu
[Download RAW message or body]

Martin Pitt <martin.pitt@ubuntu.com> 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".



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic