internal/ldap: Remove unused search function

This commit is contained in:
Michael Aldridge 2020-08-22 20:50:38 -07:00
parent 83e78da739
commit 2b8ce28a83
2 changed files with 0 additions and 17 deletions

View file

@ -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)

View file

@ -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())