ldap: Bind and fetch on client init

This commit is contained in:
Björn Busse 2021-05-29 02:13:50 +02:00
parent 0a22b62ef0
commit b3e6249325

View File

@ -90,6 +90,15 @@ func (l *Ldap) InitClient() (err error) {
log.Fatal(err)
return err
}
err = l.Client.Bind(l.username, l.password)
if err != nil {
log.Fatal(err)
}
if err := l.UpdateZones(); err != nil {
return err
}
defer l.Client.Close()
return nil