From f0e9751563272c9afa9b45918e3666c463b16632 Mon Sep 17 00:00:00 2001 From: Nathan Coad Date: Thu, 4 Jan 2024 11:51:06 +1100 Subject: [PATCH] debug --- models/ldap.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/models/ldap.go b/models/ldap.go index 28c927a..8486fad 100644 --- a/models/ldap.go +++ b/models/ldap.go @@ -55,7 +55,10 @@ func LoadLdapCert() { // only try to load certificate from file if the command line argument was specified ldapCertFile := os.Getenv("LDAP_TRUST_CERT_FILE") - if ldapCertFile != "" { + if ldapCertFile == "" { + fmt.Printf("LoadLdapCert no certificate specified\n") + return + } else { // Try to read the file cf, err := os.ReadFile(GetFilePath(ldapCertFile)) if err != nil { @@ -121,6 +124,8 @@ func VerifyLdapCreds(username string, password string) bool { if err != nil { fmt.Printf("VerifyLdapCreds error binding to LDAP with supplied credentials : '%s'\n", err) return false + } else { + fmt.Printf("VerifyLdapCreds successfully bound to LDAP\n") } searchReq := ldap.NewSearchRequest(