aboutsummaryrefslogtreecommitdiff
path: root/crypto
diff options
context:
space:
mode:
authorEric Biggers <ebiggers@google.com>2019-11-27 11:40:47 -0800
committerEric Biggers <ebiggers@google.com>2019-11-27 11:40:47 -0800
commit03d3a29b70c85f083adf3c12cba60c0374f06d3e (patch)
tree0fac2f6e457809d9c49026336d391bec7289a6b0 /crypto
parent82d01438a66212ce802721397a62c18a0b71b7ea (diff)
Rename some variables from 'target' to 'targetUser'
Refer to the target User as 'targetUser' rather than simply 'target'. This will help avoid confusion when we add support for the filesystem keyring, since then the Mount will also be a "target".
Diffstat (limited to 'crypto')
-rw-r--r--crypto/key.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/crypto/key.go b/crypto/key.go
index 7059073..52efb54 100644
--- a/crypto/key.go
+++ b/crypto/key.go
@@ -248,7 +248,7 @@ func NewFixedLengthKeyFromReader(reader io.Reader, length int) (*Key, error) {
// InsertPolicyKey puts the provided policy key into the kernel keyring with the
// provided description, and type logon. The key must be a policy key.
-func InsertPolicyKey(key *Key, description string, target *user.User) error {
+func InsertPolicyKey(key *Key, description string, targetUser *user.User) error {
if err := util.CheckValidLength(metadata.PolicyKeyLen, key.Len()); err != nil {
return errors.Wrap(err, "policy key")
}
@@ -267,7 +267,7 @@ func InsertPolicyKey(key *Key, description string, target *user.User) error {
fscryptKey.Size = metadata.PolicyKeyLen
copy(fscryptKey.Raw[:], key.data)
- return security.InsertKey(payload.data, description, target)
+ return security.InsertKey(payload.data, description, targetUser)
}
var (