aboutsummaryrefslogtreecommitdiffstats
path: root/camel
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@ximian.com>2003-04-02 07:42:58 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2003-04-02 07:42:58 +0800
commitc2fa57e71e39bfa4223f7252a674463ebb50414f (patch)
treee45dad8a85a050135aeee008b60cb095f53db6d4 /camel
parentd95c0f5a3c25b3d72637a39f7e906a2781fecee6 (diff)
downloadgsoc2013-evolution-c2fa57e71e39bfa4223f7252a674463ebb50414f.tar
gsoc2013-evolution-c2fa57e71e39bfa4223f7252a674463ebb50414f.tar.gz
gsoc2013-evolution-c2fa57e71e39bfa4223f7252a674463ebb50414f.tar.bz2
gsoc2013-evolution-c2fa57e71e39bfa4223f7252a674463ebb50414f.tar.lz
gsoc2013-evolution-c2fa57e71e39bfa4223f7252a674463ebb50414f.tar.xz
gsoc2013-evolution-c2fa57e71e39bfa4223f7252a674463ebb50414f.tar.zst
gsoc2013-evolution-c2fa57e71e39bfa4223f7252a674463ebb50414f.zip
If we are using the heimdal krb5 implementation, don't free outbuf ever.
2003-03-28 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-gssapi.c (gssapi_challenge): If we are using the heimdal krb5 implementation, don't free outbuf ever. Seems to segfault if we do. svn path=/trunk/; revision=20624
Diffstat (limited to 'camel')
-rw-r--r--camel/ChangeLog6
-rw-r--r--camel/camel-sasl-gssapi.c10
2 files changed, 16 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog
index a7022b0cc7..5f8e95b00f 100644
--- a/camel/ChangeLog
+++ b/camel/ChangeLog
@@ -1,3 +1,9 @@
+2003-03-28 Jeffrey Stedfast <fejj@ximian.com>
+
+ * camel-sasl-gssapi.c (gssapi_challenge): If we are using the
+ heimdal krb5 implementation, don't free outbuf ever. Seems to
+ segfault if we do.
+
2003-03-31 Jeffrey Stedfast <fejj@ximian.com>
* camel-mime-filter-enriched.c (enriched_to_html): Use strncasecmp
diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c
index 9faa1d8091..4f15c43821 100644
--- a/camel/camel-sasl-gssapi.c
+++ b/camel/camel-sasl-gssapi.c
@@ -264,7 +264,9 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
challenge = g_byte_array_new ();
g_byte_array_append (challenge, outbuf.value, outbuf.length);
+#ifndef HAVE_HEIMDAL_KRB5
gss_release_buffer (&minor, &outbuf);
+#endif
break;
case GSSAPI_STATE_COMPLETE:
if (token == NULL) {
@@ -285,7 +287,9 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
if (outbuf.length < 4) {
camel_exception_set (ex, CAMEL_EXCEPTION_SERVICE_CANT_AUTHENTICATE,
_("Bad authentication response from server."));
+#ifndef HAVE_HEIMDAL_KRB5
gss_release_buffer (&minor, &outbuf);
+#endif
return NULL;
}
@@ -302,7 +306,10 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
memcpy (inbuf.value, outbuf.value, 4);
str[0] = DESIRED_SECURITY_LAYER;
memcpy (str + 4, sasl->service->url->user, inbuf.length - 4);
+
+#ifndef HAVE_HEIMDAL_KRB5
gss_release_buffer (&minor, &outbuf);
+#endif
major = gss_wrap (&minor, priv->ctx, FALSE, qop, &inbuf, &conf_state, &outbuf);
if (major != GSS_S_COMPLETE) {
@@ -314,7 +321,10 @@ gssapi_challenge (CamelSasl *sasl, GByteArray *token, CamelException *ex)
g_free (str);
challenge = g_byte_array_new ();
g_byte_array_append (challenge, outbuf.value, outbuf.length);
+
+#ifndef HAVE_HEIMDAL_KRB5
gss_release_buffer (&minor, &outbuf);
+#endif
priv->state = GSSAPI_STATE_AUTHENTICATED;