mirror of
https://github.com/fluencelabs/musl
synced 2025-06-21 10:41:53 +00:00
fix nftw FTW_MOUNT flag
the incorrect check for crossing device boundaries was preventing nftw from traversing anything except the initially provided pathname.
This commit is contained in:
@ -46,8 +46,7 @@ static int do_nftw(char *path, int (*fn)(const char *, const struct stat *, int,
|
|||||||
type = FTW_F;
|
type = FTW_F;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((flags & FTW_MOUNT) && h
|
if ((flags & FTW_MOUNT) && h && st.st_dev != h->dev)
|
||||||
&& (st.st_dev != h->dev || st.st_ino != h->ino))
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
new.chain = h;
|
new.chain = h;
|
||||||
|
Reference in New Issue
Block a user