Fix the base DN searches

This commit is contained in:
signaryk 2024-07-05 17:19:15 -05:00
parent 079d832dd1
commit 02cb7a2a73

View file

@ -29,14 +29,7 @@ func (s *server) handleSearchDSE(w ldap.ResponseWriter, m *ldap.Message) {
} }
func (s *server) handleBaseDnSearch(w ldap.ResponseWriter, m *ldap.Message) { func (s *server) handleBaseDnSearch(w ldap.ResponseWriter, m *ldap.Message) {
nc := strings.Join(s.nc, ",")
e := ldap.NewSearchResultEntry(strings.Join(s.nc, ",")) e := ldap.NewSearchResultEntry(strings.Join(s.nc, ","))
e.AddAttribute("vendorName", "NetAuth")
e.AddAttribute("vendorVersion", message.AttributeValue(buildinfo.Version))
e.AddAttribute("objectClass", "top", "extensibleObject")
e.AddAttribute("supportedLDAPVersion", "3")
e.AddAttribute("namingContexts", message.AttributeValue(nc))
w.Write(e) w.Write(e)
res := ldap.NewSearchResultDoneResponse(ldap.LDAPResultSuccess) res := ldap.NewSearchResultDoneResponse(ldap.LDAPResultSuccess)