diff options
author | jilles <jilles@FreeBSD.org> | 2015-04-19 13:28:32 +0000 |
---|---|---|
committer | jilles <jilles@FreeBSD.org> | 2015-04-19 13:28:32 +0000 |
commit | d7f7bac629f6a2a0ce72b81964acef4829ca9436 (patch) | |
tree | 6873b22b60c7f95629dd1e29400bc16a5f3c9453 /tools/regression/lib/libc | |
parent | 020b763fcf974f37f21137d931a80fd877f3d281 (diff) | |
download | FreeBSD-src-d7f7bac629f6a2a0ce72b81964acef4829ca9436.zip FreeBSD-src-d7f7bac629f6a2a0ce72b81964acef4829ca9436.tar.gz |
MFC r281082: fts: Don't return FTS_SLNONE if it's not a symlink (if race).
When following symlinks, fts returned FTS_SLNONE when fstatat(flag=0)
failed, but a subsequent fstatat(flag=AT_SYMLINK_NOFOLLOW) succeeded. This
incorrectly triggered if a filename existed to be read from the directory,
was deleted before the fstatat(flag=0) and created again after the
fstatat(flag=0).
Fix this by only returning FTS_SLNONE if the result from
fstatat(flag=AT_SYMLINK_NOFOLLOW) is actually a symlink. If it is not a
symlink, treat it as if fstatat(flag=0) succeeded.
PR: 196724
Diffstat (limited to 'tools/regression/lib/libc')
0 files changed, 0 insertions, 0 deletions