소스 검색

auth: fix cherry-pick

Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
Sam Batschelet 7 년 전
부모
커밋
15903736d5
1개의 변경된 파일2개의 추가작업 그리고 2개의 파일을 삭제
  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(),
 			}