Commit 6ad0b08d authored by Luca Boccassi's avatar Luca Boccassi

Problem: GSSAPI can no longer be used without ZAP

Solution: do not fail if ZAP is not enabled.
GSSAPI already provides authentication and can be used separately,
so it is a valid use case.
parent 0ce18eac
......@@ -122,21 +122,20 @@ int zmq::gssapi_server_t::process_handshake_command (msg_t *msg_)
// Use ZAP protocol (RFC 27) to authenticate the user.
// Note that rc will be -1 only if ZAP is not set up, but if it was
// requested and it does not work properly the program will abort.
bool expecting_zap_reply = false;
int rc = session->zap_connect ();
if (rc != 0)
return -1;
rc = send_zap_request ();
if (rc != 0)
return -1;
rc = receive_and_process_zap_reply ();
if (rc == 0)
state = send_ready;
else
if (errno == EAGAIN)
state = expect_zap_reply;
else
return -1;
if (rc == 0) {
rc = send_zap_request ();
if (rc != 0)
return -1;
rc = receive_and_process_zap_reply ();
if (rc != 0) {
if (errno != EAGAIN)
return -1;
expecting_zap_reply = true;
}
}
state = expecting_zap_reply? expect_zap_reply: send_ready;
return 0;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment