sss_cache: Do not fail if noting was cached
It might happen that we have some domains in conf.db but nothing
has been cached yet. sss_cache failed in such situation,
bash-4.4# sss_cache -E
No cache object matched the specified search
bash-4.4# echo $?
2
Because there is nothing to invalidate and so we are already in state
which we want to achieve with calling sss_cache.
There is no reason to fail.
We will still fail for invalidating particular entry. User might have a
typo in the name and should be informed about possible mistake.
bash-4.4# sss_cache -u test_user
No cache object matched the specified search
bash-4.4# echo $?
2
Resolves:
https://pagure.io/SSSD/sssd/issue/3919
Merges: https://pagure.io/SSSD/sssd/pull-request/3926
Reviewed-by: Jakub Hrozek <jhrozek@redhat.com>
(cherry picked from commit 71475f1ed78a65d78f75e5ca0fdc6e20cfdf2f39)