diff options
author | Simo Sorce <simo@redhat.com> | 2013-01-07 21:34:24 -0500 |
---|---|---|
committer | Jakub Hrozek <jhrozek@redhat.com> | 2013-01-15 10:53:01 +0100 |
commit | 777f5bc1fb5f2ba4267de83843beee51090eb8d5 (patch) | |
tree | e50bb73fe7fadfcbbe011800d1dd1945ef5279f8 /src/providers | |
parent | 363ce75bfe2f73198e1ae7feeed97b6009ae24b8 (diff) | |
download | sssd-777f5bc1fb5f2ba4267de83843beee51090eb8d5.tar.gz sssd-777f5bc1fb5f2ba4267de83843beee51090eb8d5.tar.bz2 sssd-777f5bc1fb5f2ba4267de83843beee51090eb8d5.zip |
Add domain argument to sysdb_cache_password()
Diffstat (limited to 'src/providers')
-rw-r--r-- | src/providers/krb5/krb5_auth.c | 8 | ||||
-rw-r--r-- | src/providers/ldap/ldap_auth.c | 1 | ||||
-rw-r--r-- | src/providers/proxy/proxy_auth.c | 1 |
3 files changed, 7 insertions, 3 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c index 00f5c339..b4955687 100644 --- a/src/providers/krb5/krb5_auth.c +++ b/src/providers/krb5/krb5_auth.c @@ -380,7 +380,9 @@ static errno_t krb5_auth_prepare_ccache_file(struct krb5child_req *kr, return EOK; } -static void krb5_auth_store_creds(struct sysdb_ctx *sysdb, struct pam_data *pd) +static void krb5_auth_store_creds(struct sysdb_ctx *sysdb, + struct sss_domain_info *domain, + struct pam_data *pd) { const char *password = NULL; int ret = EOK; @@ -417,7 +419,7 @@ static void krb5_auth_store_creds(struct sysdb_ctx *sysdb, struct pam_data *pd) return; } - ret = sysdb_cache_password(sysdb, pd->user, password); + ret = sysdb_cache_password(sysdb, domain, pd->user, password); if (ret) { DEBUG(2, ("Failed to cache password, offline auth may not work." " (%d)[%s]!?\n", ret, strerror(ret))); @@ -1090,7 +1092,7 @@ static void krb5_auth_done(struct tevent_req *subreq) } if (state->be_ctx->domain->cache_credentials == TRUE) { - krb5_auth_store_creds(state->sysdb, pd); + krb5_auth_store_creds(state->sysdb, state->domain, pd); } state->pam_status = PAM_SUCCESS; diff --git a/src/providers/ldap/ldap_auth.c b/src/providers/ldap/ldap_auth.c index cffdf088..aa07fbb8 100644 --- a/src/providers/ldap/ldap_auth.c +++ b/src/providers/ldap/ldap_auth.c @@ -1157,6 +1157,7 @@ static void sdap_pam_auth_done(struct tevent_req *req) ret = sss_authtok_get_password(&state->pd->authtok, &password, NULL); if (ret == EOK) { ret = sysdb_cache_password(state->breq->be_ctx->sysdb, + state->breq->be_ctx->domain, state->pd->user, password); } diff --git a/src/providers/proxy/proxy_auth.c b/src/providers/proxy/proxy_auth.c index 3430f38b..d4167c1f 100644 --- a/src/providers/proxy/proxy_auth.c +++ b/src/providers/proxy/proxy_auth.c @@ -758,6 +758,7 @@ static void proxy_child_done(struct tevent_req *req) } ret = sysdb_cache_password(client_ctx->be_req->be_ctx->sysdb, + client_ctx->be_req->be_ctx->domain, pd->user, password); /* password caching failures are not fatal errors */ |