Bläddra i källkod

auth: fix cherry-pick

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
Sam Batschelet 7 år sedan
förälder
incheckning
15903736d5
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2 2
      auth/store.go

+ 2 - 2
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(),
 			}