diff options
author | guido <guido@FreeBSD.org> | 1997-04-07 18:01:10 +0000 |
---|---|---|
committer | guido <guido@FreeBSD.org> | 1997-04-07 18:01:10 +0000 |
commit | 5b77d8f791df05a5162504555a1585bfe9afa200 (patch) | |
tree | f66553daf6adeaa470da5029e2294a06d0d81aa3 /lib/libc/stdio/mktemp.c | |
parent | 506312bdd08f73c2b066b2aa82387aa0810222bc (diff) | |
download | FreeBSD-src-5b77d8f791df05a5162504555a1585bfe9afa200.zip FreeBSD-src-5b77d8f791df05a5162504555a1585bfe9afa200.tar.gz |
Fix race
Obtained from: Keith Bostic
Diffstat (limited to 'lib/libc/stdio/mktemp.c')
-rw-r--r-- | lib/libc/stdio/mktemp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/libc/stdio/mktemp.c b/lib/libc/stdio/mktemp.c index bc4c928..19125e6 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -36,7 +36,7 @@ static char sccsid[] = "@(#)mktemp.c 8.1 (Berkeley) 6/4/93"; #endif static const char rcsid[] = - "$Id$"; + "$Id: mktemp.c,v 1.6 1997/02/22 15:02:16 peter Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -109,7 +109,7 @@ _gettemp(path, doopen) if (errno != EEXIST) return(0); } - else if (stat(path, &sbuf)) + else if (lstat(path, &sbuf)) return(errno == ENOENT ? 1 : 0); /* tricky little algorithm for backward compatibility */ |