diff options
author | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-19 16:37:51 -0500 |
---|---|---|
committer | Stephen Gallagher <sgallagh@redhat.com> | 2009-11-23 12:46:30 -0500 |
commit | 64e5787639836a49ddc589eda65be454c4bdff58 (patch) | |
tree | 75fdc5923cd6854547be1cdd62110a0bd602aaab /server/responder/pam | |
parent | 23341562c1cd4baf46cbc4eacaa09d6b6cb00e82 (diff) | |
download | sssd-64e5787639836a49ddc589eda65be454c4bdff58.tar.gz sssd-64e5787639836a49ddc589eda65be454c4bdff58.tar.bz2 sssd-64e5787639836a49ddc589eda65be454c4bdff58.zip |
Speed up user requests while offline
This adds a new boolean option to sss_dp_send_acct_req() called
fast_reply. If we make a request to the backends and we are
currently offline, this option will determine whether we should
immediately return from the cache (acceptable for NSS requests) or
potentially wait for an online check to complete (required for PAM
requests).
Diffstat (limited to 'server/responder/pam')
-rw-r--r-- | server/responder/pam/pamsrv_cmd.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/server/responder/pam/pamsrv_cmd.c b/server/responder/pam/pamsrv_cmd.c index 8627d5cb..44799266 100644 --- a/server/responder/pam/pamsrv_cmd.c +++ b/server/responder/pam/pamsrv_cmd.c @@ -725,7 +725,8 @@ static int pam_forwarder(struct cli_ctx *cctx, int pam_cmd) ret = sss_dp_send_acct_req(preq->cctx->rctx, preq, pam_check_user_dp_callback, preq, - timeout, preq->domain->name, SSS_DP_INITGROUPS, + timeout, preq->domain->name, + false, SSS_DP_INITGROUPS, preq->pd->user, 0); } else { @@ -840,7 +841,8 @@ static void pam_check_user_callback(void *ptr, int status, ret = sss_dp_send_acct_req(preq->cctx->rctx, preq, pam_check_user_dp_callback, preq, - timeout, preq->domain->name, SSS_DP_USER, + timeout, preq->domain->name, + false, SSS_DP_USER, preq->pd->user, 0); if (ret != EOK) { DEBUG(3, ("Failed to dispatch request: %d(%s)\n", @@ -910,7 +912,7 @@ static void pam_check_user_callback(void *ptr, int status, pam_check_user_dp_callback, preq, timeout, preq->domain->name, - SSS_DP_USER, + false, SSS_DP_USER, preq->pd->user, 0); } else { |