Bugtraq mailing list archives

Re: Race conditions


From: roessler () indi5 iam uni-bonn de (Thomas Roessler)
Date: Fri, 9 Dec 94 17:45:49 +0100


 From: Christopher Samuel <chris () rivers dra hmg gb>
 Sender: bugtraq-owner () fc net
 
 I've just checked this out with a noddy program and built the
 following table up (appended at the end of this post along with the
 program). The most suprising part of this exercise for me was that I
 could only find *one* OS that failed the check and created the file
 pointed to be the symlink!  Must be the pessimist in me.. :)
 
 Notes:
 
 1) The program was run as a normal user, not root.
 2) The ls output looks like:
 
 -rw-r--r--   1 chris    cs2           359 Dec  8 13:46 tst.c
 lrwxrwxrwx   1 chris    cs2             3 Dec  8 14:49 symlink -> ./a
 -rwxr-xr-x   1 chris    cs2          5492 Dec  8 14:50 tst*
 
 
 Happy hunting, folks!
 Chris
 --
  Christopher Samuel     Phone:  +44 1684 894644       chris () rivers dra hmg gb
  N-115, Defence Research Agency,  St Andrews Road, Great Malvern, England, UK
  postmaster () rivers dra hmg gb                        usenet () rivers dra hmg gb
 
 ----------------------------------------------------------
 BAD - creates file with "open succeded (fh=3)":
 
 HP-UX V7.05
 ----------------------------------------------------------
 OK - fails with "open: File exists"
 
 Ultrix 4.4
 Ultrix 4.2
 SunOS 4.1.3_U1
 SunOS 4.1.3
 SunOS 4.1.1
 Solaris 2.1
 Solaris 2.3
 USL SVR4.2
 Unixware 1.1.2
 SCO 3.2 (ODT3)
 Irix 5.2
 HP-UX 9.05
 NeXTstep 3.2
 DRS/NX 6000 SVR4 Version 7  Level 2  Increment 2
 Linux 1.1.64


Well, irix 4.0.5f behaves bad and creates the file.

Cheers,

Thomas
--
Student at Institute for Applied Mathematics, University of Bonn  *  Snail 
mail: Thomas Roessler, Neheimer Weg 1, 51109 Koeln, Germany   *  INTERNET: 
roessler () indi5 iam uni-bonn de * BITNET: uzs076 at dbnrhrz1.bitnet  *  PGP 
public key info via finger  *  http://rhein.iam.uni-bonn.de:1025/~roessler

  If you can't convince them, confuse them.



Current thread: