[SSSD] [sssd PR#5239][+Accepted] gpo: use correct base dn

2020-09-02 Thread elkoniu
  URL: https://github.com/SSSD/sssd/pull/5239
Title: #5239: gpo: use correct base dn

Label: +Accepted
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org


[SSSD] [sssd PR#5239][-Waiting for review] gpo: use correct base dn

2020-09-02 Thread elkoniu
  URL: https://github.com/SSSD/sssd/pull/5239
Title: #5239: gpo: use correct base dn

Label: -Waiting for review
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org


[SSSD] [sssd PR#5299][-Waiting for review] dp: fix potential race condition in provider's sbus server

2020-09-02 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5299
Title: #5299: dp: fix potential race condition in provider's sbus server

Label: -Waiting for review
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org


[SSSD] [sssd PR#5299][comment] dp: fix potential race condition in provider's sbus server

2020-09-02 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5299
Title: #5299: dp: fix potential race condition in provider's sbus server

alexey-tikhonov commented:
"""
Those are reproducible:
```
FAIL test_ldap.py::test_refresh_after_cleanup_task
FAIL test_memory_cache.py::test_colliding_hashes
FAIL test_pam_responder.py::test_require_sc_auth_no_cert
```

```
AssertionError: assert -1 != -1
 +  where -1 = (('pam_authenticate for user [user1]: Authentication ' + 
'service cannot retrieve authentication info'))
 +where  = 'Unable to 
connect to system bus!\nInfoPipe User lookup with [user1] failed.\nPassword: 
Password: pam_authenticate for user [user1]: System error\n\nPAM Environment:\n 
- no env -\n'.find
```
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5299#issuecomment-685938822
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org


[SSSD] [sssd PR#5299][+Changes requested] dp: fix potential race condition in provider's sbus server

2020-09-02 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5299
Title: #5299: dp: fix potential race condition in provider's sbus server

Label: +Changes requested
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org


[SSSD] [sssd PR#5294][+branch: sssd-1-16] krb5: only try pkinit with Smartcard credentials

2020-09-02 Thread alexey-tikhonov
  URL: https://github.com/SSSD/sssd/pull/5294
Title: #5294: krb5: only try pkinit with Smartcard credentials

Label: +branch: sssd-1-16
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org


[SSSD] [sssd PR#5303][synchronized] tests: run TIER-0 multihost tests in PRCI

2020-09-02 Thread pbrezina
   URL: https://github.com/SSSD/sssd/pull/5303
Author: pbrezina
 Title: #5303: tests: run TIER-0 multihost tests in PRCI
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5303/head:pr5303
git checkout pr5303
From ba3281b9b4dc202919261112e1545954b6f61362 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= 
Date: Thu, 27 Aug 2020 13:55:14 +0200
Subject: [PATCH 1/5] conf: disable python2 bindings by default

Python2 is being fully replaced by Python3 on modern distros so
there is no need to build the bindings by default. We even don't
ship python2 packages in Fedora for quite some time now.

Keeping this on by default requires using --without-python2-bindings
on modern distributions where python2 is not installed by default.
---
 src/conf_macros.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index 2b3d402dcb..1256e1a780 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -377,10 +377,10 @@ AC_DEFUN([WITH_KRB5_CONF],
 AC_DEFUN([WITH_PYTHON2_BINDINGS],
   [ AC_ARG_WITH([python2-bindings],
 [AC_HELP_STRING([--with-python2-bindings],
-[Whether to build python2 bindings [yes]])
+[Whether to build python2 bindings [no]])
 ],
 [],
-[with_python2_bindings=yes]
+[with_python2_bindings=no]
)
 if test x"$with_python2_bindings" = xyes; then
 AC_SUBST([HAVE_PYTHON2_BINDINGS], [yes])

From aaa8f36fc1e98c2fccf0716203c0b5a81e187acf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= 
Date: Fri, 28 Aug 2020 13:09:22 +0200
Subject: [PATCH 2/5] multihost: move sssd.testlib closer to tests

So it can be used directly without the need of installing the package.
---
 .gitignore  | 6 ++
 Makefile.am | 2 +-
 src/tests/{python => multihost}/MANIFEST.in | 0
 src/tests/{python => multihost}/README.rst  | 0
 src/tests/multihost/{basic => }/conftest.py | 0
 src/tests/{python => multihost}/docs/Install.rst| 0
 src/tests/{python => multihost}/docs/Makefile   | 0
 src/tests/{python => multihost}/docs/MultihostPlugin.rst| 0
 src/tests/{python => multihost}/docs/conf.py| 0
 src/tests/{python => multihost}/docs/ds_389.rst | 0
 src/tests/{python => multihost}/docs/examples.rst   | 0
 src/tests/{python => multihost}/docs/index.rst  | 0
 src/tests/{python => multihost}/docs/kcm.rst| 0
 src/tests/{python => multihost}/docs/krb5.rst   | 0
 src/tests/{python => multihost}/docs/layout.rst | 0
 src/tests/{python => multihost}/docs/running.rst| 0
 src/tests/{python => multihost}/docs/sssd-testlib.rst   | 0
 src/tests/{python => multihost}/setup.py| 0
 src/tests/{python => multihost}/sssd-testlib.spec   | 0
 src/tests/{python => multihost}/sssd/__init__.py| 0
 src/tests/{python => multihost}/sssd/testlib/__init__.py| 0
 .../{python => multihost}/sssd/testlib/common/__init__.py   | 0
 .../{python => multihost}/sssd/testlib/common/authconfig.py | 0
 .../{python => multihost}/sssd/testlib/common/exceptions.py | 0
 .../{python => multihost}/sssd/testlib/common/libdirsrv.py  | 0
 .../{python => multihost}/sssd/testlib/common/libkrb5.py| 0
 .../{python => multihost}/sssd/testlib/common/qe_class.py   | 0
 .../{python => multihost}/sssd/testlib/common/utils.py  | 0
 src/tests/{python => multihost}/sssd/testlib/etc/pylintrc   | 0
 29 files changed, 7 insertions(+), 1 deletion(-)
 rename src/tests/{python => multihost}/MANIFEST.in (100%)
 rename src/tests/{python => multihost}/README.rst (100%)
 rename src/tests/multihost/{basic => }/conftest.py (100%)
 rename src/tests/{python => multihost}/docs/Install.rst (100%)
 rename src/tests/{python => multihost}/docs/Makefile (100%)
 rename src/tests/{python => multihost}/docs/MultihostPlugin.rst (100%)
 rename src/tests/{python => multihost}/docs/conf.py (100%)
 rename src/tests/{python => multihost}/docs/ds_389.rst (100%)
 rename src/tests/{python => multihost}/docs/examples.rst (100%)
 rename src/tests/{python => multihost}/docs/index.rst (100%)
 rename src/tests/{python => multihost}/docs/kcm.rst (100%)
 rename src/tests/{python => multihost}/docs/krb5.rst (100%)
 rename src/tests/{python => multihost}/docs/layout.rst (100%)
 rename src/tests/{python => multihost}/docs/running.rst (100%)
 rename src/tests/{python => multihost}/docs/sssd-testlib.rst (100%)
 rename src/tests/{python => multihost}/setup.py (100%)
 rename src/tests/{python => multihost}/sssd-testlib.spec (100%)
 rename src/tests/{python => multihost}/sssd/__init__.py (100%)
 rename src/te

[SSSD] [sssd PR#5303][opened] tests: run TIER-0 multihost tests in PRCI

2020-09-02 Thread pbrezina
   URL: https://github.com/SSSD/sssd/pull/5303
Author: pbrezina
 Title: #5303: tests: run TIER-0 multihost tests in PRCI
Action: opened

PR body:
"""
I currently expect failure on rhel-7 box since there are problems
with nss which prohibits me from creating a new vagrant box that
is required for these tests.

I had to revert "libdirsrv should be modified to be compatible with new DS"
as it does not provision the directory server correctly, this needs to be
fixed.
"""

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5303/head:pr5303
git checkout pr5303
From ba3281b9b4dc202919261112e1545954b6f61362 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= 
Date: Thu, 27 Aug 2020 13:55:14 +0200
Subject: [PATCH 1/5] conf: disable python2 bindings by default

Python2 is being fully replaced by Python3 on modern distros so
there is no need to build the bindings by default. We even don't
ship python2 packages in Fedora for quite some time now.

Keeping this on by default requires using --without-python2-bindings
on modern distributions where python2 is not installed by default.
---
 src/conf_macros.m4 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/conf_macros.m4 b/src/conf_macros.m4
index 2b3d402dcb..1256e1a780 100644
--- a/src/conf_macros.m4
+++ b/src/conf_macros.m4
@@ -377,10 +377,10 @@ AC_DEFUN([WITH_KRB5_CONF],
 AC_DEFUN([WITH_PYTHON2_BINDINGS],
   [ AC_ARG_WITH([python2-bindings],
 [AC_HELP_STRING([--with-python2-bindings],
-[Whether to build python2 bindings [yes]])
+[Whether to build python2 bindings [no]])
 ],
 [],
-[with_python2_bindings=yes]
+[with_python2_bindings=no]
)
 if test x"$with_python2_bindings" = xyes; then
 AC_SUBST([HAVE_PYTHON2_BINDINGS], [yes])

From aaa8f36fc1e98c2fccf0716203c0b5a81e187acf Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pavel=20B=C5=99ezina?= 
Date: Fri, 28 Aug 2020 13:09:22 +0200
Subject: [PATCH 2/5] multihost: move sssd.testlib closer to tests

So it can be used directly without the need of installing the package.
---
 .gitignore  | 6 ++
 Makefile.am | 2 +-
 src/tests/{python => multihost}/MANIFEST.in | 0
 src/tests/{python => multihost}/README.rst  | 0
 src/tests/multihost/{basic => }/conftest.py | 0
 src/tests/{python => multihost}/docs/Install.rst| 0
 src/tests/{python => multihost}/docs/Makefile   | 0
 src/tests/{python => multihost}/docs/MultihostPlugin.rst| 0
 src/tests/{python => multihost}/docs/conf.py| 0
 src/tests/{python => multihost}/docs/ds_389.rst | 0
 src/tests/{python => multihost}/docs/examples.rst   | 0
 src/tests/{python => multihost}/docs/index.rst  | 0
 src/tests/{python => multihost}/docs/kcm.rst| 0
 src/tests/{python => multihost}/docs/krb5.rst   | 0
 src/tests/{python => multihost}/docs/layout.rst | 0
 src/tests/{python => multihost}/docs/running.rst| 0
 src/tests/{python => multihost}/docs/sssd-testlib.rst   | 0
 src/tests/{python => multihost}/setup.py| 0
 src/tests/{python => multihost}/sssd-testlib.spec   | 0
 src/tests/{python => multihost}/sssd/__init__.py| 0
 src/tests/{python => multihost}/sssd/testlib/__init__.py| 0
 .../{python => multihost}/sssd/testlib/common/__init__.py   | 0
 .../{python => multihost}/sssd/testlib/common/authconfig.py | 0
 .../{python => multihost}/sssd/testlib/common/exceptions.py | 0
 .../{python => multihost}/sssd/testlib/common/libdirsrv.py  | 0
 .../{python => multihost}/sssd/testlib/common/libkrb5.py| 0
 .../{python => multihost}/sssd/testlib/common/qe_class.py   | 0
 .../{python => multihost}/sssd/testlib/common/utils.py  | 0
 src/tests/{python => multihost}/sssd/testlib/etc/pylintrc   | 0
 29 files changed, 7 insertions(+), 1 deletion(-)
 rename src/tests/{python => multihost}/MANIFEST.in (100%)
 rename src/tests/{python => multihost}/README.rst (100%)
 rename src/tests/multihost/{basic => }/conftest.py (100%)
 rename src/tests/{python => multihost}/docs/Install.rst (100%)
 rename src/tests/{python => multihost}/docs/Makefile (100%)
 rename src/tests/{python => multihost}/docs/MultihostPlugin.rst (100%)
 rename src/tests/{python => multihost}/docs/conf.py (100%)
 rename src/tests/{python => multihost}/docs/ds_389.rst (100%)
 rename src/tests/{python => multihost}/docs/examples.rst (100%)
 rename src/tests/{python => multihost}/docs/index.rst (100%)
 rename src/tests/{python => multihost}/docs/kcm.rst (100%)
 rename src/tests/{python => multihost}/docs/krb5.rst (100%)
 rename src/tests/{python => multihost}/docs/layout.rst (100%)
 r

[SSSD] [sssd PR#5234][comment] pam: use requested_domains to restrict cache_req searches

2020-09-02 Thread sumit-bose
  URL: https://github.com/SSSD/sssd/pull/5234
Title: #5234: pam: use requested_domains to restrict cache_req searches

sumit-bose commented:
"""
> LGTM except mentioning pam_sss inside cache_req.

ah, sorry, I missed this. Latest version should fix it.
"""

See the full comment at 
https://github.com/SSSD/sssd/pull/5234#issuecomment-685640787
___
sssd-devel mailing list -- sssd-devel@lists.fedorahosted.org
To unsubscribe send an email to sssd-devel-le...@lists.fedorahosted.org
Fedora Code of Conduct: 
https://docs.fedoraproject.org/en-US/project/code-of-conduct/
List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines
List Archives: 
https://lists.fedorahosted.org/archives/list/sssd-devel@lists.fedorahosted.org


[SSSD] [sssd PR#5234][synchronized] pam: use requested_domains to restrict cache_req searches

2020-09-02 Thread sumit-bose
   URL: https://github.com/SSSD/sssd/pull/5234
Author: sumit-bose
 Title: #5234: pam: use requested_domains to restrict cache_req searches
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5234/head:pr5234
git checkout pr5234
From 0d7cd6939d693ebf79d99032d8e8d9d714145ce9 Mon Sep 17 00:00:00 2001
From: Sumit Bose 
Date: Tue, 7 Jul 2020 16:27:32 +0200
Subject: [PATCH 1/5] cache_req: allow to restrict the domains an object is
 search in

With the new call cache_req_data_set_requested_domains() a
NULL-terminated list of domain names can be added to cache_req so
that the object is only searched in the listed domains. If the list only
contains unknown domains the cache_req will return with an error.
---
 src/responder/common/cache_req/cache_req.c| 22 +--
 src/responder/common/cache_req/cache_req.h|  3 +++
 .../common/cache_req/cache_req_data.c | 12 ++
 .../common/cache_req/cache_req_domain.c   | 18 +++
 .../common/cache_req/cache_req_domain.h   |  1 +
 .../common/cache_req/cache_req_private.h  |  3 +++
 6 files changed, 52 insertions(+), 7 deletions(-)

diff --git a/src/responder/common/cache_req/cache_req.c b/src/responder/common/cache_req/cache_req.c
index f492e9f612..afb0e7cdac 100644
--- a/src/responder/common/cache_req/cache_req.c
+++ b/src/responder/common/cache_req/cache_req.c
@@ -1059,7 +1059,8 @@ static void cache_req_domains_updated(struct tevent_req *subreq);
 static void cache_req_input_parsed(struct tevent_req *subreq);
 
 static errno_t cache_req_select_domains(struct tevent_req *req,
-const char *domain_name);
+const char *domain_name,
+char **requested_domains);
 
 static errno_t
 cache_req_search_domains(struct tevent_req *req,
@@ -1117,7 +1118,8 @@ struct tevent_req *cache_req_send(TALLOC_CTX *mem_ctx,
 goto done;
 }
 
-ret = cache_req_select_domains(req, state->domain_name);
+ret = cache_req_select_domains(req, state->domain_name,
+   cr->data->requested_domains);
 
 done:
 if (ret == EOK) {
@@ -1230,7 +1232,8 @@ static void cache_req_domains_updated(struct tevent_req *subreq)
 }
 
 immediately:
-ret = cache_req_select_domains(req, state->domain_name);
+ret = cache_req_select_domains(req, state->domain_name,
+   state->cr->data->requested_domains);
 
 done:
 if (ret != EOK && ret != EAGAIN) {
@@ -1275,7 +1278,8 @@ static void cache_req_input_parsed(struct tevent_req *subreq)
 }
 
 state->domain_name = domain;
-ret = cache_req_select_domains(req, domain);
+ret = cache_req_select_domains(req, domain,
+   state->cr->data->requested_domains);
 if (ret != EAGAIN) {
 tevent_req_error(req, ret);
 return;
@@ -1283,7 +1287,8 @@ static void cache_req_input_parsed(struct tevent_req *subreq)
 }
 
 static errno_t cache_req_select_domains(struct tevent_req *req,
-const char *domain_name)
+const char *domain_name,
+char **requested_domains)
 {
 struct cache_req_state *state = NULL;
 struct cache_req_domain *cr_domain;
@@ -1303,6 +1308,7 @@ static errno_t cache_req_select_domains(struct tevent_req *req,
 
 ret = cache_req_domain_copy_cr_domains(state,
state->cr->rctx->cr_domains,
+   requested_domains,
&state->cr_domains);
 if (ret != EOK) {
 DEBUG(SSSDBG_CRIT_FAILURE, "cache_req_copy_cr_domains() failed\n");
@@ -1391,7 +1397,8 @@ static void cache_req_process_result(struct tevent_req *subreq)
 if (ret == ENOENT && state->first_iteration) {
 /* Try again different search schema. */
 state->first_iteration = false;
-ret = cache_req_select_domains(req, state->domain_name);
+ret = cache_req_select_domains(req, state->domain_name,
+   state->cr->data->requested_domains);
 if (ret == EOK) {
 /* We're done searching and we have found nothing. */
 ret = ENOENT;
@@ -1404,7 +1411,8 @@ static void cache_req_process_result(struct tevent_req *subreq)
 if (cache_req_assume_upn(state->cr)) {
 /* Try UPN now. */
 state->first_iteration = true;
-ret = cache_req_select_domains(req, NULL);
+ret = cache_req_select_domains(req, NULL,
+state->cr->data->requested_domains);
 }
 }
 }
diff --git a/src/responder/common/cache_req/cache_req.h b/src/responder/common/cache_r

[SSSD] [sssd PR#5234][synchronized] pam: use requested_domains to restrict cache_req searches

2020-09-02 Thread sumit-bose
   URL: https://github.com/SSSD/sssd/pull/5234
Author: sumit-bose
 Title: #5234: pam: use requested_domains to restrict cache_req searches
Action: synchronized

To pull the PR as Git branch:
git remote add ghsssd https://github.com/SSSD/sssd
git fetch ghsssd pull/5234/head:pr5234
git checkout pr5234
From 40ab9ebd1a6a1e9a0d139ce811f2014a2ea3ed93 Mon Sep 17 00:00:00 2001
From: Sumit Bose 
Date: Tue, 7 Jul 2020 16:27:32 +0200
Subject: [PATCH 1/6] cache_req: allow to restrict the domains an object is
 search in

With the new call cache_req_data_set_requested_domains() a
NULL-terminated list of domain names can be added to cache_req so
that the object is only searched in the listed domains. If the list only
contains unknown domains the cache_req will return with an error.
---
 src/responder/common/cache_req/cache_req.c| 22 +--
 src/responder/common/cache_req/cache_req.h|  3 +++
 .../common/cache_req/cache_req_data.c | 12 ++
 .../common/cache_req/cache_req_domain.c   | 18 +++
 .../common/cache_req/cache_req_domain.h   |  1 +
 .../common/cache_req/cache_req_private.h  |  3 +++
 6 files changed, 52 insertions(+), 7 deletions(-)

diff --git a/src/responder/common/cache_req/cache_req.c b/src/responder/common/cache_req/cache_req.c
index f492e9f612..afb0e7cdac 100644
--- a/src/responder/common/cache_req/cache_req.c
+++ b/src/responder/common/cache_req/cache_req.c
@@ -1059,7 +1059,8 @@ static void cache_req_domains_updated(struct tevent_req *subreq);
 static void cache_req_input_parsed(struct tevent_req *subreq);
 
 static errno_t cache_req_select_domains(struct tevent_req *req,
-const char *domain_name);
+const char *domain_name,
+char **requested_domains);
 
 static errno_t
 cache_req_search_domains(struct tevent_req *req,
@@ -1117,7 +1118,8 @@ struct tevent_req *cache_req_send(TALLOC_CTX *mem_ctx,
 goto done;
 }
 
-ret = cache_req_select_domains(req, state->domain_name);
+ret = cache_req_select_domains(req, state->domain_name,
+   cr->data->requested_domains);
 
 done:
 if (ret == EOK) {
@@ -1230,7 +1232,8 @@ static void cache_req_domains_updated(struct tevent_req *subreq)
 }
 
 immediately:
-ret = cache_req_select_domains(req, state->domain_name);
+ret = cache_req_select_domains(req, state->domain_name,
+   state->cr->data->requested_domains);
 
 done:
 if (ret != EOK && ret != EAGAIN) {
@@ -1275,7 +1278,8 @@ static void cache_req_input_parsed(struct tevent_req *subreq)
 }
 
 state->domain_name = domain;
-ret = cache_req_select_domains(req, domain);
+ret = cache_req_select_domains(req, domain,
+   state->cr->data->requested_domains);
 if (ret != EAGAIN) {
 tevent_req_error(req, ret);
 return;
@@ -1283,7 +1287,8 @@ static void cache_req_input_parsed(struct tevent_req *subreq)
 }
 
 static errno_t cache_req_select_domains(struct tevent_req *req,
-const char *domain_name)
+const char *domain_name,
+char **requested_domains)
 {
 struct cache_req_state *state = NULL;
 struct cache_req_domain *cr_domain;
@@ -1303,6 +1308,7 @@ static errno_t cache_req_select_domains(struct tevent_req *req,
 
 ret = cache_req_domain_copy_cr_domains(state,
state->cr->rctx->cr_domains,
+   requested_domains,
&state->cr_domains);
 if (ret != EOK) {
 DEBUG(SSSDBG_CRIT_FAILURE, "cache_req_copy_cr_domains() failed\n");
@@ -1391,7 +1397,8 @@ static void cache_req_process_result(struct tevent_req *subreq)
 if (ret == ENOENT && state->first_iteration) {
 /* Try again different search schema. */
 state->first_iteration = false;
-ret = cache_req_select_domains(req, state->domain_name);
+ret = cache_req_select_domains(req, state->domain_name,
+   state->cr->data->requested_domains);
 if (ret == EOK) {
 /* We're done searching and we have found nothing. */
 ret = ENOENT;
@@ -1404,7 +1411,8 @@ static void cache_req_process_result(struct tevent_req *subreq)
 if (cache_req_assume_upn(state->cr)) {
 /* Try UPN now. */
 state->first_iteration = true;
-ret = cache_req_select_domains(req, NULL);
+ret = cache_req_select_domains(req, NULL,
+state->cr->data->requested_domains);
 }
 }
 }
diff --git a/src/responder/common/cache_req/cache_req.h b/src/responder/common/cache_r