summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorjoerg <joerg@FreeBSD.org>2001-04-23 10:01:38 +0000
committerjoerg <joerg@FreeBSD.org>2001-04-23 10:01:38 +0000
commitc22f3155bd89779380c9cea759931fe8a8ded233 (patch)
treeb7b25a0913dcdb4e88b63e79a28f9ed39c1d9e35 /lib
parent02fc5bae58266ec2eada38a0cb150b52355d2e0a (diff)
downloadFreeBSD-src-c22f3155bd89779380c9cea759931fe8a8ded233.zip
FreeBSD-src-c22f3155bd89779380c9cea759931fe8a8ded233.tar.gz
Fix directory reads of MNT_UNION mounts, where entries present in both
layers would be displayed twice. PR: bin/26498 Submitted by: Olliver Fromme <olli@secnetix.de>
Diffstat (limited to 'lib')
-rw-r--r--lib/libc/gen/opendir.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/libc/gen/opendir.c b/lib/libc/gen/opendir.c
index 518d160..d1762f5 100644
--- a/lib/libc/gen/opendir.c
+++ b/lib/libc/gen/opendir.c
@@ -117,7 +117,8 @@ __opendir2(name, flags)
if (_fstatfs(fd, &sfb) < 0)
goto fail;
- unionstack = !strcmp(sfb.f_fstypename, "union");
+ unionstack = !strcmp(sfb.f_fstypename, "union")
+ || (sfb.f_flags & MNT_UNION);
} else {
unionstack = 0;
}
OpenPOWER on IntegriCloud