Repository: qpid-proton Updated Branches: refs/heads/master 89fca58f4 -> c6499b687
PROTON-933: Workaround for seeming bug in Cyrus SASL GSSAPI buffer size reporting Project: http://git-wip-us.apache.org/repos/asf/qpid-proton/repo Commit: http://git-wip-us.apache.org/repos/asf/qpid-proton/commit/c6499b68 Tree: http://git-wip-us.apache.org/repos/asf/qpid-proton/tree/c6499b68 Diff: http://git-wip-us.apache.org/repos/asf/qpid-proton/diff/c6499b68 Branch: refs/heads/master Commit: c6499b687cce4102655db2d7012bc7cbc9bcd1fd Parents: 89fca58 Author: Andrew Stitcher <astitc...@apache.org> Authored: Mon Jul 6 15:15:16 2015 -0400 Committer: Andrew Stitcher <astitc...@apache.org> Committed: Mon Jul 6 15:54:08 2015 -0400 ---------------------------------------------------------------------- proton-c/src/sasl/cyrus_sasl.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/qpid-proton/blob/c6499b68/proton-c/src/sasl/cyrus_sasl.c ---------------------------------------------------------------------- diff --git a/proton-c/src/sasl/cyrus_sasl.c b/proton-c/src/sasl/cyrus_sasl.c index b71a435..6100474 100644 --- a/proton-c/src/sasl/cyrus_sasl.c +++ b/proton-c/src/sasl/cyrus_sasl.c @@ -408,7 +408,12 @@ ssize_t pni_sasl_impl_max_encrypt_size(pn_transport_t *transport) return PN_ERR; } int outbuf_size = *(int *) value; - return outbuf_size; + return outbuf_size - + // XXX: this is a clientside workaround/hack to make GSSAPI work as the Cyrus SASL + // GSSAPI plugin seems to return an incorrect value for the buffer size on the client + // side, which is greater than the value returned on the server side. Actually using + // the entire client side buffer will cause a server side error due to a buffer overrun. + (transport->sasl->client? 60 : 0); } ssize_t pni_sasl_impl_encode(pn_transport_t *transport, pn_bytes_t in, pn_bytes_t *out) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@qpid.apache.org For additional commands, e-mail: commits-h...@qpid.apache.org