summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/mktemp.c22
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 @@
1/* THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL OPENBSD SOURCE */ 1/* THIS FILE HAS BEEN MODIFIED FROM THE ORIGINAL OPENBSD SOURCE */
2/* Changes: Removed mktemp */ 2/* Changes: Removed mktemp */
3 3
4/* $OpenBSD: mktemp.c,v 1.21 2008/07/22 21:47:45 deraadt Exp $ */ 4/* $OpenBSD: mktemp.c,v 1.22 2008/08/21 16:54:44 millert Exp $ */
5/* 5/*
6 * Copyright (c) 1987, 1993 6 * Copyright (c) 1987, 1993
7 * The Regents of the University of California. All rights reserved. 7 * The Regents of the University of California. All rights reserved.
@@ -112,26 +112,6 @@ _gettemp(path, doopen, domkdir, slen)
112 } 112 }
113 start = trv + 1; 113 start = trv + 1;
114 114
115 /* Check the target directory. */
116 if (doopen || domkdir) {
117 for (;; --trv) {
118 if (trv <= path)
119 break;
120 if (*trv == '/') {
121 *trv = '\0';
122 rval = stat(path, &sbuf);
123 *trv = '/';
124 if (rval != 0)
125 return(0);
126 if (!S_ISDIR(sbuf.st_mode)) {
127 errno = ENOTDIR;
128 return(0);
129 }
130 break;
131 }
132 }
133 }
134
135 for (;;) { 115 for (;;) {
136 if (doopen) { 116 if (doopen) {
137 if ((*doopen = 117 if ((*doopen =