summaryrefslogtreecommitdiff
path: root/src/providers/krb5
diff options
context:
space:
mode:
authorJakub Hrozek <jhrozek@redhat.com>2012-03-05 21:09:37 +0100
committerStephen Gallagher <sgallagh@redhat.com>2012-03-06 15:29:18 -0500
commitb300bad539e9a9ad7f3a88dc91253afff0425cb6 (patch)
tree4fbd463ffcb9c6b898d72f27aa443deea1e2bff4 /src/providers/krb5
parent21f666d6a88dfa9cd7e984c25464dd56fe170598 (diff)
downloadsssd-b300bad539e9a9ad7f3a88dc91253afff0425cb6.tar.gz
sssd-b300bad539e9a9ad7f3a88dc91253afff0425cb6.tar.bz2
sssd-b300bad539e9a9ad7f3a88dc91253afff0425cb6.zip
Only do one cycle when resolving a server
https://fedorahosted.org/sssd/ticket/1214
Diffstat (limited to 'src/providers/krb5')
-rw-r--r--src/providers/krb5/krb5_auth.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index 14a7c547..72992ba7 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -883,14 +883,16 @@ static void krb5_child_done(struct tevent_req *subreq)
if (kr->kpasswd_srv != NULL) {
/* ..which is unreachable by now.. */
if (msg_status == PAM_AUTHTOK_LOCK_BUSY) {
- fo_set_port_status(kr->kpasswd_srv, PORT_NOT_WORKING);
+ be_fo_set_port_status(state->be_ctx,
+ kr->kpasswd_srv, PORT_NOT_WORKING);
/* ..try to resolve next kpasswd server */
if (krb5_next_kpasswd(req) == NULL) {
tevent_req_error(req, ENOMEM);
}
return;
} else {
- fo_set_port_status(kr->kpasswd_srv, PORT_WORKING);
+ be_fo_set_port_status(state->be_ctx,
+ kr->kpasswd_srv, PORT_WORKING);
}
}
@@ -900,7 +902,7 @@ static void krb5_child_done(struct tevent_req *subreq)
if (msg_status == PAM_AUTHINFO_UNAVAIL ||
(kr->kpasswd_srv == NULL && msg_status == PAM_AUTHTOK_LOCK_BUSY)) {
if (kr->srv != NULL) {
- fo_set_port_status(kr->srv, PORT_NOT_WORKING);
+ be_fo_set_port_status(state->be_ctx, kr->srv, PORT_NOT_WORKING);
/* ..try to resolve next KDC */
if (krb5_next_kdc(req) == NULL) {
tevent_req_error(req, ENOMEM);
@@ -908,7 +910,7 @@ static void krb5_child_done(struct tevent_req *subreq)
return;
}
} else if (kr->srv != NULL) {
- fo_set_port_status(kr->srv, PORT_WORKING);
+ be_fo_set_port_status(state->be_ctx, kr->srv, PORT_WORKING);
}
/* Now only a successful authentication or password change is left.
@@ -971,17 +973,20 @@ static struct tevent_req *krb5_next_server(struct tevent_req *req)
switch (pd->cmd) {
case SSS_PAM_AUTHENTICATE:
case SSS_CMD_RENEW:
- fo_set_port_status(state->kr->srv, PORT_NOT_WORKING);
+ be_fo_set_port_status(state->be_ctx,
+ state->kr->srv, PORT_NOT_WORKING);
next_req = krb5_next_kdc(req);
break;
case SSS_PAM_CHAUTHTOK:
case SSS_PAM_CHAUTHTOK_PRELIM:
if (state->kr->kpasswd_srv) {
- fo_set_port_status(state->kr->kpasswd_srv, PORT_NOT_WORKING);
+ be_fo_set_port_status(state->be_ctx,
+ state->kr->kpasswd_srv, PORT_NOT_WORKING);
next_req = krb5_next_kpasswd(req);
break;
} else {
- fo_set_port_status(state->kr->srv, PORT_NOT_WORKING);
+ be_fo_set_port_status(state->be_ctx,
+ state->kr->srv, PORT_NOT_WORKING);
next_req = krb5_next_kdc(req);
break;
}