aboutsummaryrefslogtreecommitdiff
path: root/main.go
diff options
context:
space:
mode:
authorJakob Unterwurzacher2015-12-11 19:54:53 +0100
committerJakob Unterwurzacher2015-12-11 20:02:12 +0100
commite99e8417137a713348d2797ba813bcefe0c3984d (patch)
tree1bd0f54313472a914ebb8f5370f4b97001f8b85c /main.go
parent78cd97c5e9de221a6cd2ddfcaaa2c1f1f430d264 (diff)
Rmdir: handle creating and removing unreadable directories
This patch also splits off Mkdir and Rmdir into its own file. Fixes issue #8, thanks to @diseq for the bug report.
Diffstat (limited to 'main.go')
-rw-r--r--main.go7
1 files changed, 6 insertions, 1 deletions
diff --git a/main.go b/main.go
index 21d8ed6..49b13d1 100644
--- a/main.go
+++ b/main.go
@@ -159,7 +159,7 @@ func main() {
"Setting this to a lower value speeds up mounting but makes the password susceptible to brute-force attacks")
flagSet.Parse(os.Args[1:])
- // Fork a child into the background if "-f" is not set and we are mounting a filesystem
+ // Fork a child into the background if "-f" is not set AND we are mounting a filesystem
if !args.foreground && flagSet.NArg() == 2 {
forkChild() // does not return
}
@@ -339,6 +339,11 @@ func pathfsFrontend(key []byte, args argContainer, confFile *cryptfs.ConfFile) *
}
srv.SetDebug(args.fusedebug)
+ // All FUSE file and directory create calls carry explicit permission
+ // information. We need an unrestricted umask to create the files and
+ // directories with the requested permissions.
+ syscall.Umask(0000)
+
return srv
}