Commit c1632ea0 authored by ale's avatar ale
Browse files

Fix compile error

parent 01a58c48
...@@ -205,8 +205,11 @@ func newLDAPBackend(config *Config) (*ldapBackend, error) { ...@@ -205,8 +205,11 @@ func newLDAPBackend(config *Config) (*ldapBackend, error) {
} }
// Read the bind password. // Read the bind password.
bindPw := config.LDAPConfig.BindPw var bindPw []byte
if bindPw == "" { if config.LDAPConfig.BindPw != "" {
bindPw = []byte(config.LDAPConfig.BindPw)
} else {
var err error
bindPw, err = ioutil.ReadFile(config.LDAPConfig.BindPwFile) bindPw, err = ioutil.ReadFile(config.LDAPConfig.BindPwFile)
if err != nil { if err != nil {
return nil, err return nil, err
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment