diff options
author | Jakob Unterwurzacher | 2016-06-23 21:29:00 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-06-23 21:38:59 +0200 |
commit | b17f0465c7c38cab2f1f4ad0fc25d64d5cd175e7 (patch) | |
tree | c898e5a535f0f9c0f8fcd8c58a01ac78ac550298 /internal/fusefrontend/fs_dir.go | |
parent | 8a2e1a543aa793bf234838b8ba03b28c43f802a8 (diff) |
Drop deprecated "-diriv" option
The DirIV feature flag is already mandatory, dropping the command
line option is the final step.
Diffstat (limited to 'internal/fusefrontend/fs_dir.go')
-rw-r--r-- | internal/fusefrontend/fs_dir.go | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/internal/fusefrontend/fs_dir.go b/internal/fusefrontend/fs_dir.go index f77486d..80a66ca 100644 --- a/internal/fusefrontend/fs_dir.go +++ b/internal/fusefrontend/fs_dir.go @@ -46,9 +46,6 @@ func (fs *FS) Mkdir(newPath string, mode uint32, context *fuse.Context) (code fu if err != nil { return fuse.ToStatus(err) } - if !fs.args.DirIV { - return fuse.ToStatus(os.Mkdir(cPath, os.FileMode(mode))) - } // We need write and execute permissions to create gocryptfs.diriv origMode := mode mode = mode | 0300 @@ -98,9 +95,6 @@ func (fs *FS) Rmdir(path string, context *fuse.Context) (code fuse.Status) { if err != nil { return fuse.ToStatus(err) } - if !fs.args.DirIV { - return fuse.ToStatus(syscall.Rmdir(cPath)) - } parentDir := filepath.Dir(cPath) parentDirFd, err := os.Open(parentDir) @@ -215,10 +209,10 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f if cipherEntries == nil { return nil, status } - // Get DirIV (stays nil if DirIV if off) + // Get DirIV (stays nil if PlaintextNames is used) var cachedIV []byte var cDirAbsPath string - if fs.args.DirIV { + if !fs.args.PlaintextNames { // Read the DirIV once and use it for all later name decryptions cDirAbsPath = filepath.Join(fs.args.Cipherdir, cDirName) cachedIV, err = nametransform.ReadDirIV(cDirAbsPath) @@ -237,7 +231,7 @@ func (fs *FS) OpenDir(dirName string, context *fuse.Context) ([]fuse.DirEntry, f // silently ignore "gocryptfs.conf" in the top level dir continue } - if fs.args.DirIV && cName == nametransform.DirIVFilename { + if !fs.args.PlaintextNames && cName == nametransform.DirIVFilename { // silently ignore "gocryptfs.diriv" everywhere if dirIV is enabled continue } |