mirror of
https://github.com/etcd-io/etcd.git
synced 2024-09-27 06:25:44 +00:00
auth: fix cherry-pick
Signed-off-by: Sam Batschelet <sbatsche@redhat.com>
This commit is contained in:
committed by
Sam Batschelet
parent
c7f744d6d3
commit
15903736d5
@@ -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(),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user