nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] mhstore -clobber

2012-09-16 14:14:34
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.)


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>