diff --git a/internal/ldap/ldap.go b/internal/ldap/ldap.go index 3fca128..deed242 100644 --- a/internal/ldap/ldap.go +++ b/internal/ldap/ldap.go @@ -28,11 +28,6 @@ func New(l hclog.Logger, nacl naClient) *server { Filter("(objectclass=*)"). Label("Search - ROOT DSE") - routes.Search(x.handleSearchMyCompany). - BaseDn("o=My Company, c=US"). - Scope(ldap.SearchRequestScopeBaseObject). - Label("Search - Compagny Root") - routes.Search(x.handleSearch).Label("Search - Generic") x.Handle(routes) diff --git a/internal/ldap/search.go b/internal/ldap/search.go index fbddf5e..e64d32f 100644 --- a/internal/ldap/search.go +++ b/internal/ldap/search.go @@ -25,18 +25,6 @@ func (s *server) handleSearchDSE(w ldap.ResponseWriter, m *ldap.Message) { w.Write(res) } -func (s *server) handleSearchMyCompany(w ldap.ResponseWriter, m *ldap.Message) { - r := m.GetSearchRequest() - log.Printf("handleSearchMyCompany - Request BaseDn=%s", r.BaseObject()) - - e := ldap.NewSearchResultEntry(string(r.BaseObject())) - e.AddAttribute("objectClass", "top", "organizationalUnit") - w.Write(e) - - res := ldap.NewSearchResultDoneResponse(ldap.LDAPResultSuccess) - w.Write(res) -} - func (s *server) handleSearch(w ldap.ResponseWriter, m *ldap.Message) { r := m.GetSearchRequest() log.Printf("Request BaseDn=%s", r.BaseObject())