summaryrefslogtreecommitdiff
path: root/src/providers
diff options
context:
space:
mode:
authorPavel Březina <pbrezina@redhat.com>2012-12-10 15:21:57 +0100
committerJakub Hrozek <jhrozek@redhat.com>2012-12-10 19:20:22 +0100
commit8914b982dd70e1a68d7b7fd55951b854ce9abc9b (patch)
treecdf759e03c09e362c65684b88f8d7dcf99cf192f /src/providers
parentbb969edb07119ed54c636e5d80ccbed68e2acd39 (diff)
downloadsssd-8914b982dd70e1a68d7b7fd55951b854ce9abc9b.tar.gz
sssd-8914b982dd70e1a68d7b7fd55951b854ce9abc9b.tar.bz2
sssd-8914b982dd70e1a68d7b7fd55951b854ce9abc9b.zip
let krb5_kpasswd failover work
https://fedorahosted.org/sssd/ticket/1680 There were two errors: 1. kr->kpasswd_srv was never set 2. bad service name (KERBEROS) was provided when setting port status, thus the port status never changed
Diffstat (limited to 'src/providers')
-rw-r--r--src/providers/krb5/krb5_auth.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index 7104b312..94bbe485 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -679,7 +679,11 @@ static void krb5_auth_resolve_done(struct tevent_req *subreq)
char *msg;
int ret;
- ret = be_resolve_server_recv(subreq, &kr->srv);
+ if (!state->search_kpasswd) {
+ ret = be_resolve_server_recv(subreq, &kr->srv);
+ } else {
+ ret = be_resolve_server_recv(subreq, &kr->kpasswd_srv);
+ }
talloc_zfree(subreq);
if (state->search_kpasswd) {
@@ -969,7 +973,7 @@ static void krb5_auth_done(struct tevent_req *subreq)
/* ..which is unreachable by now.. */
if (res->msg_status == PAM_AUTHTOK_LOCK_BUSY) {
be_fo_set_port_status(state->be_ctx,
- state->krb5_ctx->service->name,
+ state->krb5_ctx->kpasswd_service->name,
kr->kpasswd_srv, PORT_NOT_WORKING);
/* ..try to resolve next kpasswd server */
state->search_kpasswd = true;
@@ -985,7 +989,7 @@ static void krb5_auth_done(struct tevent_req *subreq)
return;
} else {
be_fo_set_port_status(state->be_ctx,
- state->krb5_ctx->service->name,
+ state->krb5_ctx->kpasswd_service->name,
kr->kpasswd_srv, PORT_WORKING);
}
}