Skip to content

Commit

Permalink
More fixes.
Browse files Browse the repository at this point in the history
  • Loading branch information
Macmod committed Nov 19, 2024
1 parent 423b1c7 commit 42c8f65
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions tui/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ func setupLDAPConn() error {
updateLog(fmt.Sprint(err), "red")
} else {
updateLog("Connection success", "green")
updateStateBox(tlsPanel, Ldaps)
isSecure := Ldaps

var bindType string
if tlsConfig.Certificates != nil {
Expand All @@ -339,7 +339,7 @@ func setupLDAPConn() error {
}
}

updateStateBox(tlsPanel, true)
isSecure = true
bindType = "LDAP+ClientCertificate"
} else if Kerberos {
ccachePath := os.Getenv("KRB5CCNAME")
Expand All @@ -366,14 +366,15 @@ func setupLDAPConn() error {
}

if err != nil {
// Bind failed
updateLog(fmt.Sprint(err), "red")
} else {
updateStateBox(tlsPanel, isSecure)
updateLog("Bind success ("+bindType+")", "green")
}
}

updateStateBox(statusPanel, err == nil)
updateStateBox(tlsPanel, Ldaps)

return err
}
Expand Down

0 comments on commit 42c8f65

Please sign in to comment.