diff options
| author | Eric Biggers <ebiggers@google.com> | 2019-11-27 11:40:47 -0800 |
|---|---|---|
| committer | Eric Biggers <ebiggers@google.com> | 2019-11-27 11:40:47 -0800 |
| commit | 03d3a29b70c85f083adf3c12cba60c0374f06d3e (patch) | |
| tree | 0fac2f6e457809d9c49026336d391bec7289a6b0 /crypto/key.go | |
| parent | 82d01438a66212ce802721397a62c18a0b71b7ea (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/key.go')
| -rw-r--r-- | crypto/key.go | 4 |
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 ( |