Fix the base DN searches
This commit is contained in:
parent
757cbb740c
commit
f91f8874dc
|
@ -15,13 +15,16 @@ import (
|
||||||
|
|
||||||
func (s *server) handleSearchDSE(w ldap.ResponseWriter, m *ldap.Message) {
|
func (s *server) handleSearchDSE(w ldap.ResponseWriter, m *ldap.Message) {
|
||||||
nc := strings.Join(s.nc, ",")
|
nc := strings.Join(s.nc, ",")
|
||||||
|
r := m.GetSearchRequest()
|
||||||
|
|
||||||
e := ldap.NewSearchResultEntry("")
|
e := ldap.NewSearchResultEntry("")
|
||||||
e.AddAttribute("vendorName", "NetAuth")
|
if len(r.Attributes()) == 0 {
|
||||||
e.AddAttribute("vendorVersion", message.AttributeValue(buildinfo.Version))
|
e.AddAttribute("vendorName", "NetAuth")
|
||||||
e.AddAttribute("objectClass", "top", "extensibleObject")
|
e.AddAttribute("vendorVersion", message.AttributeValue(buildinfo.Version))
|
||||||
e.AddAttribute("supportedLDAPVersion", "3")
|
e.AddAttribute("objectClass", "top", "extensibleObject")
|
||||||
e.AddAttribute("namingContexts", message.AttributeValue(nc))
|
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)
|
||||||
|
|
Loading…
Reference in a new issue