mirror of
https://github.com/openharmony/third_party_FreeBSD.git
synced 2026-07-01 08:11:39 -04:00
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:
+3
-10
@@ -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:
|
||||
|
||||
Reference in New Issue
Block a user