]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commit
actions/policy: improve errors
authorEric Biggers <ebiggers@google.com>
Sat, 9 May 2020 21:52:07 +0000 (14:52 -0700)
committerEric Biggers <ebiggers@google.com>
Sat, 9 May 2020 22:21:31 +0000 (15:21 -0700)
commit209a2d1419ea575fd316bd9975fb63e40cce7a77
tree30d6b308d60af9963f7dbfd0bf989b7728d3f2b2
parent37457cce5b0436493dba7cdac6e1af5f51d25f47
actions/policy: improve errors

ErrMissingPolicyMetadata:
Include the mount, directory path, and metadata path.  Also move
the explanation into actions/ since it doesn't refer to any CLI
command.

ErrPolicyMetadataMismatch:
Include a lot more information.  Also start checking for
consistency of the policy key descriptors, not just the
encryption options.  Add a test for this.

ErrDifferentFilesystem:
Include the mountpoints.

ErrOnlyProtector:
Clarify the message and include the protector descriptor.

ErrAlreadyProtected:
ErrNotProtected:
Include the policy and protector descriptors.

ErrAccessDeniedPossiblyV2:
Make it slightly clearer what failed.  Also move the explanation
into actions/ since it doesn't refer to any CLI command.
actions/policy.go
cli-tests/t_unlock.out
cli-tests/t_unlock.sh
cmd/fscrypt/errors.go
cmd/fscrypt/prompt.go
filesystem/filesystem.go