]> andersk Git - openssh.git/blobdiff - openbsd-compat/getcwd.c
- (dtucker) [openbsd-compat/getcwd.c] Replace lstat with fstat to match up
[openssh.git] / openbsd-compat / getcwd.c
index 9354f7ae431dee0bcdc2ecc77e2f8ed071ff9c0b..711cb9cd5d47edc575ced9fa8c2086ca7536f019 100644 (file)
@@ -144,10 +144,8 @@ getcwd(char *pt, size_t size)
                *bup++ = '.';
                *bup = '\0';
 
-               /* Open and stat parent directory. 
-                * RACE?? - replaced fstat(dirfd(dir), &s) w/ lstat(up,&s) 
-                 */
-               if (!(dir = opendir(up)) || lstat(up,&s))
+               /* Open and stat parent directory. */
+               if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
                        goto err;
 
                /* Add trailing slash for next directory. */
This page took 0.487164 seconds and 4 git commands to generate.