diff options
author | Damien Miller <djm@mindrot.org> | 2011-09-23 02:47:29 +0200 |
---|---|---|
committer | Damien Miller <djm@mindrot.org> | 2011-09-23 02:47:29 +0200 |
commit | 3a359b3228fae226d4d73e7b9021c15904d274b4 (patch) | |
tree | e95466df056e68230bfccf90c5af8393b8affc52 /openbsd-compat/mktemp.c | |
parent | - deraadt@cvs.openbsd.org 2008/07/22 21:47:45 (diff) | |
download | openssh-3a359b3228fae226d4d73e7b9021c15904d274b4.tar.xz openssh-3a359b3228fae226d4d73e7b9021c15904d274b4.zip |
- millert@cvs.openbsd.org 2008/08/21 16:54:44
[mktemp.c]
Remove useless code, the kernel will set errno appropriately if an
element in the path does not exist. OK deraadt@ pvalchev@
Diffstat (limited to '')
-rw-r--r-- | openbsd-compat/mktemp.c | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/openbsd-compat/mktemp.c b/openbsd-compat/mktemp.c index 5bdf3e6d9..945806526 100644 --- a/openbsd-compat/mktemp.c +++ b/openbsd-compat/mktemp.c @@ -1,7 +1,7 @@ /* THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL OPENBSD SOURCE */ /* Changes: Removed mktemp */ -/* $OpenBSD: mktemp.c,v 1.21 2008/07/22 21:47:45 deraadt Exp $ */ +/* $OpenBSD: mktemp.c,v 1.22 2008/08/21 16:54:44 millert Exp $ */ /* * Copyright (c) 1987, 1993 * The Regents of the University of California. All rights reserved. @@ -112,26 +112,6 @@ _gettemp(path, doopen, domkdir, slen) } start = trv + 1; - /* Check the target directory. */ - if (doopen || domkdir) { - for (;; --trv) { - if (trv <= path) - break; - if (*trv == '/') { - *trv = '\0'; - rval = stat(path, &sbuf); - *trv = '/'; - if (rval != 0) - return(0); - if (!S_ISDIR(sbuf.st_mode)) { - errno = ENOTDIR; - return(0); - } - break; - } - } - } - for (;;) { if (doopen) { if ((*doopen = |