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 /cmd/fscrypt/flags.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 'cmd/fscrypt/flags.go')
| -rw-r--r-- | cmd/fscrypt/flags.go | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/cmd/fscrypt/flags.go b/cmd/fscrypt/flags.go index a7992d3..16a75dc 100644 --- a/cmd/fscrypt/flags.go +++ b/cmd/fscrypt/flags.go @@ -255,18 +255,18 @@ func matchMetadataFlag(flagValue string) (mountpoint, descriptor string, err err // parseMetadataFlag takes the value of either protectorFlag or policyFlag // formatted as MOUNTPOINT:DESCRIPTOR, and returns a context for the mountpoint // and a string for the descriptor. -func parseMetadataFlag(flagValue string, target *user.User) (*actions.Context, string, error) { +func parseMetadataFlag(flagValue string, targetUser *user.User) (*actions.Context, string, error) { mountpoint, descriptor, err := matchMetadataFlag(flagValue) if err != nil { return nil, "", err } - ctx, err := actions.NewContextFromMountpoint(mountpoint, target) + ctx, err := actions.NewContextFromMountpoint(mountpoint, targetUser) return ctx, descriptor, err } // getProtectorFromFlag gets an existing locked protector from protectorFlag. -func getProtectorFromFlag(flagValue string, target *user.User) (*actions.Protector, error) { - ctx, descriptor, err := parseMetadataFlag(flagValue, target) +func getProtectorFromFlag(flagValue string, targetUser *user.User) (*actions.Protector, error) { + ctx, descriptor, err := parseMetadataFlag(flagValue, targetUser) if err != nil { return nil, err } @@ -274,8 +274,8 @@ func getProtectorFromFlag(flagValue string, target *user.User) (*actions.Protect } // getPolicyFromFlag gets an existing locked policy from policyFlag. -func getPolicyFromFlag(flagValue string, target *user.User) (*actions.Policy, error) { - ctx, descriptor, err := parseMetadataFlag(flagValue, target) +func getPolicyFromFlag(flagValue string, targetUser *user.User) (*actions.Policy, error) { + ctx, descriptor, err := parseMetadataFlag(flagValue, targetUser) if err != nil { return nil, err } |