From 5586bc35fbb33f20c38f52285c19c015b804ea94 Mon Sep 17 00:00:00 2001 From: Joe Richey Date: Thu, 31 Aug 2017 11:29:30 -0700 Subject: Fixed linter issues --- cmd/fscrypt/errors.go | 1 - security/keyring.go | 5 ++--- 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 -- cgit v1.2.3