From 15903736d506d4e8d1aefd7e2fcf212a616da1dd Mon Sep 17 00:00:00 2001 From: Sam Batschelet Date: Tue, 8 Jan 2019 21:23:00 +0000 Subject: [PATCH] auth: fix cherry-pick Signed-off-by: Sam Batschelet --- auth/store.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/auth/store.go b/auth/store.go index be9873644..d676cb555 100644 --- a/auth/store.go +++ b/auth/store.go @@ -970,7 +970,7 @@ func (as *authStore) Revision() uint64 { return atomic.LoadUint64(&as.revision) } -func (as *authStore) AuthInfoFromTLS(ctx context.Context) (ai *AuthInfo) { +func (as *authStore) AuthInfoFromTLS(ctx context.Context) *AuthInfo { peer, ok := peer.FromContext(ctx) if !ok || peer == nil || peer.AuthInfo == nil { return nil @@ -982,7 +982,7 @@ func (as *authStore) AuthInfoFromTLS(ctx context.Context) (ai *AuthInfo) { cn := chain.Subject.CommonName plog.Debugf("found common name %s", cn) - ai = &AuthInfo{ + ai := &AuthInfo{ Username: cn, Revision: as.Revision(), }