outpost/ldap: fix panic when attempting to update without locked users mutex
Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
parent
ea63d384fd
commit
ae9f1c1063
|
@ -45,8 +45,9 @@ func (ls *LDAPServer) Refresh() error {
|
||||||
existing := ls.getCurrentProvider(provider.Pk)
|
existing := ls.getCurrentProvider(provider.Pk)
|
||||||
users := make(map[string]flags.UserFlags)
|
users := make(map[string]flags.UserFlags)
|
||||||
if existing != nil {
|
if existing != nil {
|
||||||
existing.boundUsersMutex.Unlock()
|
existing.boundUsersMutex.RLock()
|
||||||
users = existing.boundUsers
|
users = existing.boundUsers
|
||||||
|
existing.boundUsersMutex.RUnlock()
|
||||||
}
|
}
|
||||||
|
|
||||||
providers[idx] = &ProviderInstance{
|
providers[idx] = &ProviderInstance{
|
||||||
|
|
Reference in New Issue