aboutsummaryrefslogtreecommitdiff
path: root/actions/protector.go
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2020-05-09 14:04:47 -0700
committerEric Biggers <ebiggers@google.com>2020-05-09 14:04:47 -0700
commit8ff53630f1cc90ae23835e9571f9096e211dce67 (patch)
tree56eaebbb984ff3e4e2f8512e17bff3be77fe4bb0 /actions/protector.go
parent31bc8c843e1862b2d28f31eff85eca3d1dbd4754 (diff)
cmd/fscrypt: add FSCRYPT_ROOT_MNT environmental variable
Allow overriding the mountpoint where login protectors are stored by setting the FSCRYPT_ROOT_MNT environmental variable. The CLI tests need this to avoid touching the real "/".
Diffstat (limited to 'actions/protector.go')
-rw-r--r--actions/protector.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/actions/protector.go b/actions/protector.go
index 4bd7c15..dab9c27 100644
--- a/actions/protector.go
+++ b/actions/protector.go
@@ -30,6 +30,10 @@ import (
"github.com/google/fscrypt/util"
)
+// LoginProtectorMountpoint is the mountpoint where login protectors are stored.
+// This can be overridden by the user of this package.
+var LoginProtectorMountpoint = "/"
+
// Errors relating to Protectors
var (
ErrProtectorName = errors.New("login protectors do not need a name")