diff options
author | Jeffrey Stedfast <fejj@ximian.com> | 2003-03-28 21:21:05 +0000 |
---|---|---|
committer | Jeffrey Stedfast <fejj@src.gnome.org> | 2003-03-28 21:21:05 +0000 |
commit | bc3ad3ba94df85c713963dd7475aaae39a0ce9bf (patch) | |
tree | 61ff234c068c4f00a32c69fdc4942ba375ba7ed1 | |
parent | 7a068e9381111c1508e70c7fbd0f54c1a81606fa (diff) | |
download | evolution-data-server-evolution-1-2-4-branch.tar.gz |
If we are using the heimdal krb5 implementation, don't free outbuf ever.EVOLUTION_1_2_4evolution-1-2-4-branch
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.
-rw-r--r-- | camel/ChangeLog | 6 | ||||
-rw-r--r-- | camel/camel-sasl-gssapi.c | 10 |
2 files changed, 16 insertions, 0 deletions
diff --git a/camel/ChangeLog b/camel/ChangeLog index a87558fe3..5b1d2fef8 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-27 Jeffrey Stedfast <fejj@ximian.com> * camel-sasl-gssapi.c (gssapi_challenge): Get rid of debug diff --git a/camel/camel-sasl-gssapi.c b/camel/camel-sasl-gssapi.c index 9faa1d809..4f15c4382 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; |