Browse Source

Merge pull request #2517 from yichengq/fix-sec2

security: fix var shadowing in CreateOrUpdateUser
Xiang Li 10 years ago
parent
commit
bba7f75562
1 changed files with 1 additions and 1 deletions
  1. 1 1
      etcdserver/security/security.go

+ 1 - 1
etcdserver/security/security.go

@@ -115,7 +115,7 @@ func (s *Store) GetUser(name string) (User, error) {
 }
 }
 
 
 func (s *Store) CreateOrUpdateUser(user User) (User, error) {
 func (s *Store) CreateOrUpdateUser(user User) (User, error) {
-	user, err := s.GetUser(user.User)
+	_, err := s.GetUser(user.User)
 	if err == nil {
 	if err == nil {
 		// Remove the update-user roles from updating downstream.
 		// Remove the update-user roles from updating downstream.
 		// Roles are granted or revoked, not changed directly.
 		// Roles are granted or revoked, not changed directly.