summaryrefslogtreecommitdiff
path: root/openbsd-compat/getcwd.c
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat/getcwd.c')
-rw-r--r--openbsd-compat/getcwd.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/openbsd-compat/getcwd.c b/openbsd-compat/getcwd.c
index 9354f7ae4..711cb9cd5 100644
--- a/openbsd-compat/getcwd.c
+++ b/openbsd-compat/getcwd.c
@@ -144,10 +144,8 @@ getcwd(char *pt, size_t size)
144 *bup++ = '.'; 144 *bup++ = '.';
145 *bup = '\0'; 145 *bup = '\0';
146 146
147 /* Open and stat parent directory. 147 /* Open and stat parent directory. */
148 * RACE?? - replaced fstat(dirfd(dir), &s) w/ lstat(up,&s) 148 if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
149 */
150 if (!(dir = opendir(up)) || lstat(up,&s))
151 goto err; 149 goto err;
152 150
153 /* Add trailing slash for next directory. */ 151 /* Add trailing slash for next directory. */