nmh-workers
[Top][All Lists]
Advanced

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

Re: [Nmh-workers] mhstore -clobber


From: Paul Vixie
Subject: Re: [Nmh-workers] mhstore -clobber
Date: Sun, 16 Sep 2012 19:14:10 +0000
User-agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120907 Thunderbird/15.0.1

On 2012-09-16 4:50 PM, David Levine wrote:
> Lyndon wrote:
>
>> On 2012-09-16, at 8:42 AM, Lyndon Nerenberg wrote:
>>
>>> Well, there's the obvious race condition ...
>> Sorry, I left out the "NFS" in front of "race."
> What's the NFS race condition?  If you're talking about
> old NFS that doesn't support O_EXCL, I'm not willing to
> jump through hoops for that.

i don't think it requires nfs in order for it to be a race. granted,
this code cannot lose a race against itself if coded as open, close,
fopen, since the file name will be stable and the open uses creat|excl.
however, some other app could sneak in and get the file opened between
the close and the fopen, which smells like a security problem. far
better to do open, fdopen. (i'm thinking now of two of "crontab"'s early
CERT advisories.)




reply via email to

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