aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/bindfs.14
-rwxr-xr-xtests/test_bindfs.rb11
2 files changed, 15 insertions, 0 deletions
diff --git a/src/bindfs.1 b/src/bindfs.1
index 121c8ab..e458ecf 100644
--- a/src/bindfs.1
+++ b/src/bindfs.1
@@ -455,6 +455,10 @@ Older systems may require this deprecated fstab syntax.
Setuid and setgid bits have no effect inside the mount.
This is a necessary security feature of FUSE.
+Access to device files is denied by default by FUSE as a security precaution.
+Use \fB\-o dev\fP to enable access (requires mounting as root). This may not
+be supported on all operating systems.
+
MacFuse caches file contents by default.
This means that changes in source files are not always immediately visible under the mount point.
\fB\-o nolocalcaches\fP can be used to disable the cache.
diff --git a/tests/test_bindfs.rb b/tests/test_bindfs.rb
index ba30528..d3f54b9 100755
--- a/tests/test_bindfs.rb
+++ b/tests/test_bindfs.rb
@@ -747,6 +747,17 @@ testenv("", :title => "mntdir with newline", :mntdir_name => "a\nb") do
assert { File.exist?("a\nb/f") }
end
+if `uname`.strip != 'FreeBSD' # -o dev is not supported on FreeBSD
+ root_testenv("-odev") do
+ system("mknod mnt/zero c 1 5")
+ data = File.read("mnt/zero", 3)
+ assert { data.length == 3 }
+ assert { data.chars.to_a[0] == "\0" }
+ assert { data.chars.to_a[1] == "\0" }
+ assert { data.chars.to_a[2] == "\0" }
+ end
+end
+
# FIXME: this stuff around testenv is a hax, and testenv may also exit(), which defeats the 'ensure' below.
# the test setup ought to be refactored. It might well use MiniTest or something.
# TODO: support FreeBSD in this test (different group management commands)