summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Unterwurzacher2021-08-12 19:19:50 +0200
committerJakob Unterwurzacher2021-08-12 19:19:50 +0200
commit9a8dfd98ef4038d743c88aa8de397a58a6b64dff (patch)
treef012d21da12ebe34847b095faa5192033e510f51
parent831e2256169abf85890e0ab54144b9041995e54d (diff)
main: accept magic /dev/fd/ mountpoint
https://github.com/rfjakob/gocryptfs/issues/590
-rw-r--r--mount.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/mount.go b/mount.go
index ab4ad81..3f190d4 100644
--- a/mount.go
+++ b/mount.go
@@ -66,6 +66,11 @@ func doMount(args *argContainer) {
}
if args.nonempty {
err = isDir(args.mountpoint)
+ } else if strings.HasPrefix(args.mountpoint, "/dev/fd/") {
+ // Magic fuse fd syntax, do nothing and let go-fuse figure it out.
+ //
+ // See https://github.com/libfuse/libfuse/commit/64e11073b9347fcf9c6d1eea143763ba9e946f70
+ // and `drop_privileges` in `man mount.fuse3` for background.
} else {
err = isEmptyDir(args.mountpoint)
// OSXFuse will create the mountpoint for us ( https://github.com/rfjakob/gocryptfs/issues/194 )