summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRich Felker <dalias@aerifal.cx>2014-02-01 14:33:33 -0500
committerRich Felker <dalias@aerifal.cx>2014-02-01 14:33:33 -0500
commit73871ee3f21b13b88f2f20a39a1d9bc751bcc1df (patch)
tree5e4824cdd7180cef9f3f373d643e0d2491ca11b3
parentf1471d32166e0881dccc1d551b59238a07351668 (diff)
downloadmusl-73871ee3f21b13b88f2f20a39a1d9bc751bcc1df.tar.gz
musl-73871ee3f21b13b88f2f20a39a1d9bc751bcc1df.tar.bz2
musl-73871ee3f21b13b88f2f20a39a1d9bc751bcc1df.tar.xz
musl-73871ee3f21b13b88f2f20a39a1d9bc751bcc1df.zip
fix nftw FTW_MOUNT flag
the incorrect check for crossing device boundaries was preventing nftw from traversing anything except the initially provided pathname.
-rw-r--r--src/misc/nftw.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/misc/nftw.c b/src/misc/nftw.c
index b2e84bca..efb2b895 100644
--- a/src/misc/nftw.c
+++ b/src/misc/nftw.c
@@ -46,8 +46,7 @@ static int do_nftw(char *path, int (*fn)(const char *, const struct stat *, int,
type = FTW_F;
}
- if ((flags & FTW_MOUNT) && h
- && (st.st_dev != h->dev || st.st_ino != h->ino))
+ if ((flags & FTW_MOUNT) && h && st.st_dev != h->dev)
return 0;
new.chain = h;