Bugtraq mailing list archives
Re: Race conditions, mkstemp
From: casper () fwi uva nl (Casper Dik)
Date: Sun, 11 Dec 1994 14:07:02 +0100
here is the source for mkstemp from csrg. note the filesystem must support exclusive file locking atomic to the open() for this to be helpful. as is written in the mkstemp() man page. why wasnt O_TRUNC included. that would hammer both soft and hard links
Because it serves no useful purpose. A file created with O_EXCL|O_CREAT will have 0 lenght. If the file needs to be truncated (O_TRUNC) it already exists, but i that case the open w/ O_CREATE|O_EXCL would fail. O_CREATE|O_TRUNC|O_EXCL makes no sense. Casper
Current thread:
- Race conditions Michael Bresnahan (Dec 07)
- Re: Race conditions Luke Mewburn (Dec 07)
- Re: Race conditions Christopher Samuel (Dec 08)
- Re: Race conditions Walker Aumann (Dec 08)
- Re: Race conditions Christopher Samuel (Dec 09)
- Re: Race conditions Christopher Samuel (Dec 08)
- Re: Race conditions Luke Mewburn (Dec 07)
- Re: Race conditions Jason Matthews (Dec 08)
- Re: Race conditions Pat Myrto (Dec 09)
- Re: Race conditions, mkstemp Jonathan M. Bresler (Dec 10)
- Re: Race conditions, mkstemp Casper Dik (Dec 11)
- Re: Race conditions Pat Myrto (Dec 09)
- <Possible follow-ups>
- Re: Race conditions der Mouse (Dec 07)
- Re: Race conditions Jonathan M. Bresler (Dec 08)
- Re: Race conditions Jonas Sandberg (Dec 08)
- Re: Race conditions Christopher Samuel (Dec 12)
- Re: Race conditions Thomas Roessler (Dec 09)
- Re: Race conditions Fred Blonder (Dec 09)
- Re: Race conditions Pat Myrto (Dec 09)
- Re: Race conditions der Mouse (Dec 12)