diff options
author | Jakob Unterwurzacher | 2015-12-11 19:54:53 +0100 |
---|---|---|
committer | Jakob Unterwurzacher | 2015-12-11 20:02:12 +0100 |
commit | e99e8417137a713348d2797ba813bcefe0c3984d (patch) | |
tree | 1bd0f54313472a914ebb8f5370f4b97001f8b85c /main.go | |
parent | 78cd97c5e9de221a6cd2ddfcaaa2c1f1f430d264 (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.go | 7 |
1 files changed, 6 insertions, 1 deletions
@@ -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 } |