From a918e5ed5c987075579d103e49cda99163e6c3ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Lapeyre?= Date: Wed, 27 Apr 2022 16:47:04 +0200 Subject: [PATCH] Remove dead code in setupCredentials() (#15194) This should have been removed as part of f09e39ea42 but somehow got forgotten. --- vault/auth.go | 7 ------- 1 file changed, 7 deletions(-) diff --git a/vault/auth.go b/vault/auth.go index ec287f2f7c..14685a2b6d 100644 --- a/vault/auth.go +++ b/vault/auth.go @@ -745,8 +745,6 @@ func (c *Core) persistAuth(ctx context.Context, table *MountTable, local *bool) // setupCredentials is invoked after we've loaded the auth table to // initialize the credential backends and setup the router func (c *Core) setupCredentials(ctx context.Context) error { - var persistNeeded bool - c.authLock.Lock() defer c.authLock.Unlock() @@ -877,11 +875,6 @@ func (c *Core) setupCredentials(ctx context.Context) error { } } - if persistNeeded { - // persist non-local auth - return c.persistAuth(ctx, c.auth, nil) - } - return nil }