Feature or Bugfix: Bugfix ~
Binary Source: No
Signed-off-by: y30015170 <1169998606@qq.com>

Signed-off-by: yang-pangyuan <1169998606@qq.com>
This commit is contained in:
yang-pangyuan
2025-11-24 10:50:05 +08:00
parent 6e1bf6ab8c
commit 770a4f0b20
+3 -10
View File
@@ -1128,7 +1128,6 @@ fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path)
{
int ret, oerrno, newfd;
struct stat sb;
struct statfs sf;
newfd = fd;
if (ISSET(FTS_NOCHDIR))
@@ -1141,15 +1140,9 @@ fts_safe_changedir(FTS *sp, FTSENT *p, int fd, char *path)
goto bail;
}
if (p->fts_dev != sb.st_dev || p->fts_ino != sb.st_ino) {
if (_fstatfs(newfd, &sf) != 0 ||
(sf.f_flags & MNT_AUTOMOUNTED) == 0) {
errno = ENOENT; /* disinformation */
ret = -1;
goto bail;
}
/* autofs might did the mount under us, accept. */
p->fts_dev = sb.st_dev;
p->fts_ino = sb.st_ino;
errno = ENOENT; /* disinformation */
ret = -1;
goto bail;
}
ret = fchdir(newfd);
bail: