aboutsummaryrefslogtreecommitdiff
path: root/cmd/fscrypt/status.go
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-03-17 21:10:58 -0700
committerEric Biggers <ebiggers@google.com>2020-03-23 13:20:27 -0700
commitc123f5a24de5a25185653de8e6f970184fde035d (patch)
treeb61e89c74cc241fb6d5c6255e6063cebfec84614 /cmd/fscrypt/status.go
parentec85cc8f987647c2b264c1f95dadda0f71c3d991 (diff)
Improve error message when setting v2 policy is unsupported
If trying to encrypt a directory using a v2 policy fails due to the kernel lacking support for v2 policies, show a better error message. One way this can happen is if someone runs 'fscrypt setup' with a new kernel and then downgrades to an old kernel. Before: # echo -n hunter2 | fscrypt encrypt dir --source=custom_passphrase --name=foo --quiet [ERROR] fscrypt encrypt: inappropriate ioctl for device: system error: could not add key to the keyring After: # echo -n hunter2 | fscrypt encrypt dir --source=custom_passphrase --name=foo --quiet [ERROR] fscrypt encrypt: kernel is too old to support v2 encryption policies v2 encryption policies are only supported by kernel version 5.4 and later. Either use a newer kernel, or change policy_version to 1 in /etc/fscrypt.conf.
Diffstat (limited to 'cmd/fscrypt/status.go')
0 files changed, 0 insertions, 0 deletions