qpid-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From acon...@apache.org
Subject [16/50] [abbrv] qpid-proton git commit: PROTON-933: Workaround for seeming bug in Cyrus SASL GSSAPI buffer size reporting
Date Tue, 08 Sep 2015 16:37:34 GMT
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/proton-go
Commit: c6499b687cce4102655db2d7012bc7cbc9bcd1fd
Parents: 89fca58
Author: Andrew Stitcher <astitcher@apache.org>
Authored: Mon Jul 6 15:15:16 2015 -0400
Committer: Andrew Stitcher <astitcher@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-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org


Mime
View raw message