]> git.apps.os.sepia.ceph.com Git - fscrypt.git/commit
metadata: 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)
commitfbc161a77962fe64e3caad80efb535d28d8c1f74
tree9d716a4df35668a6fbd3c5b3665294309679cfc0
parentfb88d74f0335cdf8218bb8dfbaa03f23773318cf
metadata: improve errors

ErrBadOwners:
Rename to ErrDirectoryNotOwned for clarity, move it from
cmd/fscrypt/ to metadata/ where it better belongs, and improve
the message.

ErrEncrypted:
Rename to ErrAlreadyEncrypted for clarity, and include the path.

ErrNotEncrypted:
Include the path.

ErrBadEncryptionOptions:
Include the path and bad options.

ErrEncryptionNotSupported:
ErrEncryptionNotEnabled:
Don't wrap with "get encryption policy %s", in preparation for
wrapping these with filesystem-level context instead.

Also avoid mixing together the error handling for the "get policy" and
"set policy" ioctls.  Make it very clear how we're handling the errors
from each ioctl.
cli-tests/t_encrypt.out
cli-tests/t_encrypt_custom.out
cli-tests/t_encrypt_login.out
cli-tests/t_encrypt_raw_key.out
cli-tests/t_not_enabled.out
cli-tests/t_not_supported.out
cli-tests/t_status.out
cli-tests/t_v1_policy_fs_keyring.out
cmd/fscrypt/commands.go
cmd/fscrypt/errors.go
metadata/policy.go