diff --git a/internal/ldap/search.go b/internal/ldap/search.go index 5613e6b..572f130 100644 --- a/internal/ldap/search.go +++ b/internal/ldap/search.go @@ -80,9 +80,7 @@ func (s *server) handleSearchEntities(w ldap.ResponseWriter, m *ldap.Message) { if exprAnd { e, complete, err = s.entitySearchResultWithMatch(ctx, ents[i], r.BaseObject(), r.Attributes(), matchGroup) if !complete { - res := ldap.NewSearchResultDoneResponse(ldap.LDAPResultSuccess) - w.Write(res) - return + continue } } else { e, err = s.entitySearchResult(ctx, ents[i], r.BaseObject(), r.Attributes()) @@ -236,9 +234,7 @@ func (s *server) handleSearchGroups(w ldap.ResponseWriter, m *ldap.Message) { s.l.Debug("Match UID: ", matchUid) e, complete, err = s.groupSearchResultWithMatch(ctx, groups[i], r.BaseObject(), r.Attributes(), matchUid) if !complete { - res := ldap.NewSearchResultDoneResponse(ldap.LDAPResultSuccess) - w.Write(res) - return + continue } } else { e, err = s.groupSearchResult(ctx, groups[i], r.BaseObject(), r.Attributes())