libcontainer/keys: var should be sessKeyID/ringID (golint)
libcontainer/keys/keyctl.go:17:2: var `sessKeyId` should be `sessKeyID` (golint)
sessKeyId, err := unix.KeyctlJoinSessionKeyring(name)
^
libcontainer/keys/keyctl.go:27:21: func parameter `ringId` should be `ringID` (golint)
func ModKeyringPerm(ringId KeySerial, mask, setbits uint32) error {
^
@@ -14,18 +14,18 @@ import (
type KeySerial uint32
func JoinSessionKeyring(name string) (KeySerial, error) {
- sessKeyId, err := unix.KeyctlJoinSessionKeyring(name)
+ sessKeyID, err := unix.KeyctlJoinSessionKeyring(name)
if err != nil {
return 0, errors.Wrap(err, "create session key")
}
- return KeySerial(sessKeyId), nil
+ return KeySerial(sessKeyID), nil
}
// ModKeyringPerm modifies permissions on a keyring by reading the current permissions,
// anding the bits with the given mask (clearing permissions) and setting
// additional permission bits
-func ModKeyringPerm(ringId KeySerial, mask, setbits uint32) error {
- dest, err := unix.KeyctlString(unix.KEYCTL_DESCRIBE, int(ringId))
+func ModKeyringPerm(ringID KeySerial, mask, setbits uint32) error {
+ dest, err := unix.KeyctlString(unix.KEYCTL_DESCRIBE, int(ringID))
if err != nil {
return err
}
@@ -43,5 +43,5 @@ func ModKeyringPerm(ringId KeySerial, mask, setbits uint32) error {
perm := (uint32(perm64) & mask) | setbits
- return unix.KeyctlSetperm(int(ringId), perm)
+ return unix.KeyctlSetperm(int(ringID), perm)
}
