aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoe Richey <joerichey@google.com>2017-08-31 11:29:30 -0700
committerJoe Richey <joerichey@google.com>2017-08-31 11:29:30 -0700
commit5586bc35fbb33f20c38f52285c19c015b804ea94 (patch)
tree57201e6533ea278af9903f197146743955d9903f
parent11b31826334bc3faa4d4c7ee05a3b2996a88c969 (diff)
Fixed linter issues
-rw-r--r--cmd/fscrypt/errors.go1
-rw-r--r--security/keyring.go5
2 files changed, 2 insertions, 4 deletions
diff --git a/cmd/fscrypt/errors.go b/cmd/fscrypt/errors.go
index 88525d1..9731efc 100644
--- a/cmd/fscrypt/errors.go
+++ b/cmd/fscrypt/errors.go
@@ -61,7 +61,6 @@ var (
ErrUnknownUser = errors.New("unknown user")
ErrDropCachesPerm = errors.New("inode cache can only be dropped as root")
ErrSpecifyUser = errors.New("user must be specified when run as root")
- ErrSpecifyNonRootUser = errors.New("non-root user must be specified")
)
var loadHelpText = fmt.Sprintf("You may need to mount a linked filesystem. Run with %s for more information.", shortDisplay(verboseFlag))
diff --git a/security/keyring.go b/security/keyring.go
index 8112c54..f507737 100644
--- a/security/keyring.go
+++ b/security/keyring.go
@@ -139,8 +139,8 @@ func userKeyringID(target *user.User) (int, error) {
// We drop permissions in a separate thread (guaranteed as the main
// thread is locked) because we need to drop the real AND effective IDs.
log.Printf("Threaded keyring lookup for uid=%d", uid)
- idChan := make(chan int, 0)
- errChan := make(chan error, 0)
+ idChan := make(chan int)
+ errChan := make(chan error)
// OSThread locks ensure the privilege change is only for the lookup.
runtime.LockOSThread()
defer runtime.UnlockOSThread()
@@ -156,7 +156,6 @@ func userKeyringID(target *user.User) (int, error) {
return
}
idChan <- keyringID
- return
}()
// We select so the thread will have to complete