summaryrefslogtreecommitdiffstats
path: root/src/providers/ldap/ldap_auth.c
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2015-03-10 13:01:21 +0100
committerJakub Hrozek <jhrozek@redhat.com>2015-03-23 08:33:53 +0100
commitf0072e2b102f3b553533402d4ae42b1989b0370e (patch)
tree369b362e2d788f05b90d0c7b1ead95ce403cd35e /src/providers/ldap/ldap_auth.c
parentb123a618dd8837f8a2db385542f0d7f3d7679d9b (diff)
downloadsssd-f0072e2b102f3b553533402d4ae42b1989b0370e.tar.gz
sssd-f0072e2b102f3b553533402d4ae42b1989b0370e.tar.xz
sssd-f0072e2b102f3b553533402d4ae42b1989b0370e.zip
SDAP: Make password change timeout configurable with ldap_opt_timeout
Related: https://fedorahosted.org/sssd/ticket/1501 Reviewed-by: Pavel Reichl <preichl@redhat.com>
Diffstat (limited to 'src/providers/ldap/ldap_auth.c')
-rw-r--r--src/providers/ldap/ldap_auth.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c
index 3147b49b0..42899fd0e 100644
--- a/src/providers/ldap/ldap_auth.c
+++ b/src/providers/ldap/ldap_auth.c
@@ -1046,6 +1046,7 @@ static void sdap_auth4chpass_done(struct tevent_req *req)
} else {
const char *password;
const char *new_password;
+ int timeout;
ret = sss_authtok_get_password(state->pd->authtok,
&password, NULL);
@@ -1060,9 +1061,12 @@ static void sdap_auth4chpass_done(struct tevent_req *req)
goto done;
}
+ timeout = dp_opt_get_int(state->ctx->opts->basic, SDAP_OPT_TIMEOUT);
+
subreq = sdap_exop_modify_passwd_send(state, be_ctx->ev,
state->sh, state->dn,
- password, new_password);
+ password, new_password,
+ timeout);
if (!subreq) {
DEBUG(SSSDBG_OP_FAILURE,
"Failed to change password for %s\n", state->username);