aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/bindfs.c5
2 files changed, 8 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 31ca9bf..c1296bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2016-09-25 Martin Pärtel <martin dot partel at gmail dot com>
+
+ * Fix bug in readdir() introduced with 1.13.1. This fixes a bug when
+ a bindfs mount is exported over NFS (issue #39).
+
2016-07-31 Martin Pärtel <martin dot partel at gmail dot com>
* Added --enable-ioctl to address issue #37.
diff --git a/src/bindfs.c b/src/bindfs.c
index 82cbe0d..004c771 100644
--- a/src/bindfs.c
+++ b/src/bindfs.c
@@ -673,7 +673,6 @@ static int bindfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
}
de_buf = malloc(offsetof(struct dirent, d_name) + pc_ret + 1);
- seekdir(dp, offset);
while (1) {
result = readdir_r(dp, de_buf, &de);
if (result != 0) {
@@ -688,7 +687,9 @@ static int bindfs_readdir(const char *path, void *buf, fuse_fill_dir_t filler,
st.st_ino = de->d_ino;
st.st_mode = de->d_type << 12;
- // See issue #28 for why we pass a 0 offset to `filler`.
+ // See issue #28 for why we pass a 0 offset to `filler` and ignore
+ // `offset`.
+ //
// Given a 0 offset, `filler` should never return non-zero, so we
// consider it an error if it does. It is undocumented whether it sets
// errno in that case, so we zero it first and set it ourself if it