summaryrefslogtreecommitdiff
path: root/security/cyrus-sasl2/patches/patch-ap
diff options
context:
space:
mode:
Diffstat (limited to 'security/cyrus-sasl2/patches/patch-ap')
-rw-r--r--security/cyrus-sasl2/patches/patch-ap51
1 files changed, 45 insertions, 6 deletions
diff --git a/security/cyrus-sasl2/patches/patch-ap b/security/cyrus-sasl2/patches/patch-ap
index 4f0116b1ab5..d5d9bd4043a 100644
--- a/security/cyrus-sasl2/patches/patch-ap
+++ b/security/cyrus-sasl2/patches/patch-ap
@@ -1,13 +1,52 @@
-$NetBSD: patch-ap,v 1.1 2004/07/05 16:49:18 recht Exp $
+$NetBSD: patch-ap,v 1.2 2004/07/08 21:11:26 recht Exp $
---- plugins/gssapi.c.orig 2004-02-06 18:23:51.000000000 +0100
-+++ plugins/gssapi.c 2004-07-05 18:41:39.000000000 +0200
-@@ -1419,7 +1419,7 @@
+--- plugins/gssapi.c.orig Fri Feb 6 18:23:51 2004
++++ plugins/gssapi.c Wed Jul 7 12:09:07 2004
+@@ -990,8 +990,14 @@
+ GSS_C_QOP_DEFAULT,
+ (OM_uint32) oparams->maxoutbuf,
+ &max_input);
+-
+- oparams->maxoutbuf -= (max_input - oparams->maxoutbuf);
++
++ if(max_input > oparams->maxoutbuf) {
++ /* Heimdal appears to get this wrong */
++ oparams->maxoutbuf -= (max_input - oparams->maxoutbuf);
++ } else {
++ /* This code is actually correct */
++ oparams->maxoutbuf = max_input;
++ }
+ }
+
+ gss_release_buffer(&min_stat, output_token);
+@@ -1134,6 +1140,7 @@
+ gss_buffer_t input_token, output_token;
+ gss_buffer_desc real_input_token, real_output_token;
+ OM_uint32 maj_stat = 0, min_stat = 0;
++ OM_uint32 max_input;
+ gss_buffer_desc name_token;
+ int ret;
+ OM_uint32 req_flags, out_req_flags;
+@@ -1418,8 +1425,20 @@
+ (((unsigned char *) output_token->value)[3] << 0);
if(oparams->mech_ssf) {
- /* xxx probably too large */
+- /* xxx probably too large */
- oparams->maxoutbuf -= 50;
-+ oparams->maxoutbuf -= 256;
++ maj_stat = gss_wrap_size_limit( &min_stat,
++ text->gss_ctx,
++ 1,
++ GSS_C_QOP_DEFAULT,
++ (OM_uint32) oparams->maxoutbuf,
++ &max_input);
++
++ if(max_input > oparams->maxoutbuf) {
++ /* Heimdal appears to get this wrong */
++ oparams->maxoutbuf -= (max_input - oparams->maxoutbuf);
++ } else {
++ /* This code is actually correct */
++ oparams->maxoutbuf = max_input;
++ }
}
gss_release_buffer(&min_stat, output_token);