Bugtraq mailing list archives
Re: Race conditions
From: mouse () Collatz McRCIM McGill EDU (der Mouse)
Date: Mon, 12 Dec 1994 07:59:49 -0500
To open a file, which should already exist: [...]
if you want to allow symlinks but not allow the race, try:
-open() the file without privelege, save the inode # -open() the file withe privelege, compare the inode #'s
This fails in two ways. (1) if the file is inaccessible without privilege, the first open can never succeed. (2) if you lose the race, you've just opened something you shouldn't have; most of the time this isn't a problem, but if it's something for which open()/close() is not a no-op, like a named pipe, it can matter. der Mouse mouse () collatz mcrcim mcgill edu
Current thread:
- Re: Race conditions, (continued)
- 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)
- 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)