summaryrefslogtreecommitdiffstats
path: root/src/responder/nss
diff options
context:
space:
mode:
authorJan Zeleny <jzeleny@redhat.com>2012-03-29 08:06:47 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-04-24 09:19:43 -0400
commit3d715363a3bfac489b7500dd70de6b6bdc7aa405 (patch)
tree815cbe82b906d91b78c837910b33c0f667e1b4bd /src/responder/nss
parentf2d943ee47bb313e0bb7276122587989a3c54fb4 (diff)
downloadsssd-3d715363a3bfac489b7500dd70de6b6bdc7aa405.tar.gz
sssd-3d715363a3bfac489b7500dd70de6b6bdc7aa405.tar.xz
sssd-3d715363a3bfac489b7500dd70de6b6bdc7aa405.zip
Ask for subdomains in responder in the first request after startup
Diffstat (limited to 'src/responder/nss')
-rw-r--r--src/responder/nss/nsssrv_cmd.c30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/responder/nss/nsssrv_cmd.c b/src/responder/nss/nsssrv_cmd.c
index d4ce66569..84aa98d27 100644
--- a/src/responder/nss/nsssrv_cmd.c
+++ b/src/responder/nss/nsssrv_cmd.c
@@ -904,6 +904,16 @@ static int nss_cmd_getpwnam(struct cli_ctx *cctx)
/* this is a multidomain search */
dctx->domain = cctx->rctx->domains;
cmdctx->check_next = true;
+ if (cctx->rctx->get_domains_last_call.tv_sec == 0) {
+ req = sss_dp_get_domains_send(cctx->rctx, cctx->rctx, false, NULL);
+ if (req == NULL) {
+ ret = ENOMEM;
+ } else {
+ tevent_req_set_callback(req, nss_cmd_getpwnam_cb, dctx);
+ ret = EAGAIN;
+ }
+ goto done;
+ }
}
dctx->check_provider = NEED_CHECK_PROVIDER(dctx->domain->provider);
@@ -2264,6 +2274,16 @@ static int nss_cmd_getgrnam(struct cli_ctx *cctx)
/* this is a multidomain search */
dctx->domain = cctx->rctx->domains;
cmdctx->check_next = true;
+ if (cctx->rctx->get_domains_last_call.tv_sec == 0) {
+ req = sss_dp_get_domains_send(cctx->rctx, cctx->rctx, false, NULL);
+ if (req == NULL) {
+ ret = ENOMEM;
+ } else {
+ tevent_req_set_callback(req, nss_cmd_getgrnam_cb, dctx);
+ ret = EAGAIN;
+ }
+ goto done;
+ }
}
dctx->check_provider = NEED_CHECK_PROVIDER(dctx->domain->provider);
@@ -3361,6 +3381,16 @@ static int nss_cmd_initgroups(struct cli_ctx *cctx)
/* this is a multidomain search */
dctx->domain = cctx->rctx->domains;
cmdctx->check_next = true;
+ if (cctx->rctx->get_domains_last_call.tv_sec == 0) {
+ req = sss_dp_get_domains_send(cctx->rctx, cctx->rctx, false, NULL);
+ if (req == NULL) {
+ ret = ENOMEM;
+ } else {
+ tevent_req_set_callback(req, nss_cmd_initgroups_cb, dctx);
+ ret = EAGAIN;
+ }
+ goto done;
+ }
}
dctx->check_provider = NEED_CHECK_PROVIDER(dctx->domain->provider);