SYSDB: Make the usage of the filter more generic for search_ts_matches()
In order to make this function re-usable in different parts of our code,
let's start passing an already built filter to it instead of having the
specific code building the name filter there.
Related:
https://pagure.io/SSSD/sssd/issue/3369
Signed-off-by: Fabiano FidĂȘncio <fidencio@redhat.com>
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 8ad57e17779b3ec60246ac58c1691ee15745084c)