diff options
Diffstat (limited to 'examples/server.go')
-rw-r--r-- | examples/server.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/examples/server.go b/examples/server.go index dca74ed..3341991 100644 --- a/examples/server.go +++ b/examples/server.go @@ -24,7 +24,9 @@ func main() { s.SearchFunc("", handler) // start the server - if err := s.ListenAndServe("localhost:3389"); err != nil { + listen := "localhost:3389" + log.Printf("Starting example LDAP server on %s", listen) + if err := s.ListenAndServe(listen); err != nil { log.Fatal("LDAP Server Failed: %s", err.Error()) } } @@ -33,7 +35,7 @@ type ldapHandler struct { } ///////////// Allow anonymous binds only -func (h ldapHandler) Bind(bindDN, bindSimplePw string, conn net.Conn) (uint64, error) { +func (h ldapHandler) Bind(bindDN, bindSimplePw string, conn net.Conn) (ldap.LDAPResultCode, error) { if bindDN == "" && bindSimplePw == "" { return ldap.LDAPResultSuccess, nil } |