From 03d3a29b70c85f083adf3c12cba60c0374f06d3e Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Wed, 27 Nov 2019 11:40:47 -0800 Subject: 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". --- crypto/key.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crypto') 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 ( -- cgit v1.2.3