From 151e8965fa3a9c8f65e316430f9df0fa763fb02d Mon Sep 17 00:00:00 2001 From: "Joe Richey joerichey@google.com" Date: Tue, 15 Aug 2017 18:11:29 -0700 Subject: cmd/fscrypt: purge command now clears cache --- actions/context.go | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'actions/context.go') diff --git a/actions/context.go b/actions/context.go index fb25b54..7e4b64b 100644 --- a/actions/context.go +++ b/actions/context.go @@ -31,9 +31,10 @@ package actions import ( "log" + "golang.org/x/sys/unix" + "github.com/pkg/errors" - "github.com/google/fscrypt/crypto" "github.com/google/fscrypt/filesystem" "github.com/google/fscrypt/metadata" ) @@ -101,8 +102,10 @@ func (ctx *Context) checkContext() error { } // getService returns the keyring service for this context. We use the presence -// of the LegacyConfig flag to determine if we should use the legacy services -// (which are necessary for kernels before v4.8). +// of the LegacyConfig flag to determine if we should use the legacy services. +// For ext4 systems before v4.8 and f2fs systems before v4.6, filesystem +// specific services must be used (these legacy services will still work with +// later kernels). func (ctx *Context) getService() string { // For legacy configurations, we may need non-standard services if ctx.Config.HasCompatibilityOption(LegacyConfig) { @@ -111,7 +114,7 @@ func (ctx *Context) getService() string { return ctx.Mount.Filesystem + ":" } } - return crypto.DefaultService + return unix.FS_KEY_DESC_PREFIX } // getProtectorOption returns the ProtectorOption for the protector on the -- cgit v1.2.3