From d5f89f8fcc5172be183fb02b802fa23ed3e9f8fa Mon Sep 17 00:00:00 2001 From: "Joe Richey joerichey@google.com" Date: Thu, 8 Jun 2017 10:41:55 -0700 Subject: metadata: change encryption mode names As new encryption modes are being added to the kernel that use 128 bit keys (see https://patchwork.kernel.org/patch/9741913), we will need the encryption modes to be more descriptive. This change breaks backwards compatibility for the protobuf, but that's fine because we have not released yet. Change-Id: Ifb58d3d5a42db491f1e5393c12f3d260d9a091de --- metadata/policy.go | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'metadata/policy.go') diff --git a/metadata/policy.go b/metadata/policy.go index 102c587..ac2fde7 100644 --- a/metadata/policy.go +++ b/metadata/policy.go @@ -35,12 +35,11 @@ import ( // Encryption specific errors var ( - prefix = "filesystem encryption: " - ErrEncryptionNotSupported = errors.New(prefix + "not supported") - ErrEncryptionDisabled = errors.New(prefix + "disabled in the kernel config") - ErrNotEncrypted = errors.New(prefix + "file or directory not encrypted") - ErrEncrypted = errors.New(prefix + "file or directory already encrypted") - ErrBadEncryptionOptions = errors.New(prefix + "invalid options provided") + ErrEncryptionNotSupported = errors.New("filesystem encryption not supported") + ErrEncryptionDisabled = errors.New("filesystem encryption disabled in the kernel config") + ErrNotEncrypted = errors.New("file or directory not encrypted") + ErrEncrypted = errors.New("file or directory already encrypted") + ErrBadEncryptionOptions = util.SystemError("invalid encryption options provided") ) // policyIoctl is a wrapper for the ioctl syscall. If opens the file at the path -- cgit v1.2.3