diff options
| author | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-08-15 18:11:29 -0700 |
|---|---|---|
| committer | Joe Richey joerichey@google.com <joerichey@google.com> | 2017-08-17 22:49:44 -0700 |
| commit | 151e8965fa3a9c8f65e316430f9df0fa763fb02d (patch) | |
| tree | 5be6cb1e1d617e60ba7624abc3c940c65715ba5e /cmd/fscrypt/errors.go | |
| parent | b4d51e0f4d34dbfd78e23662f3dfd90e86ae5e48 (diff) | |
cmd/fscrypt: purge command now clears cache
Diffstat (limited to 'cmd/fscrypt/errors.go')
| -rw-r--r-- | cmd/fscrypt/errors.go | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go index b0548d5..10dbf1e 100644 --- a/cmd/fscrypt/errors.go +++ b/cmd/fscrypt/errors.go @@ -58,6 +58,7 @@ var ( ErrNotEmptyDir = errors.New("not an empty directory") ErrNotPassphrase = errors.New("protector does not use a passphrase") ErrUnknownUser = errors.New("unknown user") + ErrDropCachesPerm = errors.New("inode cache can only be dropped as root") ) var loadHelpText = fmt.Sprintf("You may need to mount a linked filesystem. Run with %s for more information.", shortDisplay(verboseFlag)) @@ -112,6 +113,11 @@ func getErrorSuggestions(err error) string { cannot be encrypted in-place. Instead, encrypt an empty directory, copy the files into that encrypted directory, and securely delete the originals with "shred".` + case ErrDropCachesPerm: + return fmt.Sprintf(`Either this command should be run as root to + properly clear the inode cache, or it should be run with + %s=false (this may leave encrypted files and directories + in an accessible state).`, shortDisplay(dropCachesFlag)) case ErrAllLoadsFailed: return loadHelpText default: |