diff options
author | 1997-04-07 22:48:50 +0000 | |
---|---|---|
committer | 1997-04-07 22:48:50 +0000 | |
commit | 611780b6a6967856b97ccdcc78e5329185e38497 (patch) | |
tree | e1cfbe90a232bc99c27faf765e441569b1c0e3ee /lib/libc/stdio/mktemp.c | |
parent | cf_flags & 0x20 forces device to be found even if it won't probe. (diff) | |
download | wireguard-openbsd-611780b6a6967856b97ccdcc78e5329185e38497.tar.xz wireguard-openbsd-611780b6a6967856b97ccdcc78e5329185e38497.zip |
Change a stat(2) -> lstat(2) to avoid symlink games. From Keith
Bostic <bostic@bostic.com>.
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 620ac64b081..a44da95580f 100644 --- a/lib/libc/stdio/mktemp.c +++ b/lib/libc/stdio/mktemp.c @@ -32,7 +32,7 @@ */ #if defined(LIBC_SCCS) && !defined(lint) -static char rcsid[] = "$OpenBSD: mktemp.c,v 1.7 1997/02/10 00:52:28 millert Exp $"; +static char rcsid[] = "$OpenBSD: mktemp.c,v 1.8 1997/04/07 22:48:50 millert Exp $"; #endif /* LIBC_SCCS and not lint */ #include <sys/types.h> @@ -132,7 +132,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 */ |