summaryrefslogtreecommitdiff
path: root/gss-genr.c
diff options
context:
space:
mode:
authorDamien Miller <djm@mindrot.org>2006-08-30 11:08:04 +1000
committerDamien Miller <djm@mindrot.org>2006-08-30 11:08:04 +1000
commit76758b6423a2567b07927139d7d5538f14cb331b (patch)
treed90967df545f3a1d0ca95f380a24b15316610745 /gss-genr.c
parentd5fe0baa73a168a1194b311aeff9fd824b038740 (diff)
- dtucker@cvs.openbsd.org 2006/08/29 12:02:30
[gss-genr.c] Work around a problem in Heimdal that occurs when KRB5CCNAME file is missing, by checking whether or not kerberos allocated us a context before attempting to free it. Patch from Simon Wilkinson, tested by biorn@, ok djm@
Diffstat (limited to 'gss-genr.c')
-rw-r--r--gss-genr.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gss-genr.c b/gss-genr.c
index e962942d1..57f12a2dc 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -1,4 +1,4 @@
1/* $OpenBSD: gss-genr.c,v 1.16 2006/08/18 22:41:29 djm Exp $ */ 1/* $OpenBSD: gss-genr.c,v 1.17 2006/08/29 12:02:30 dtucker Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001-2006 Simon Wilkinson. All rights reserved. 4 * Copyright (c) 2001-2006 Simon Wilkinson. All rights reserved.
@@ -310,8 +310,9 @@ ssh_gssapi_check_mechanism(Gssctxt **ctx, gss_OID oid, const char *host)
310 major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token, 310 major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token,
311 NULL); 311 NULL);
312 gss_release_buffer(&minor, &token); 312 gss_release_buffer(&minor, &token);
313 gss_delete_sec_context(&minor, &(*ctx)->context, 313 if ((*ctx)->context != GSS_C_NO_CONTEXT)
314 GSS_C_NO_BUFFER); 314 gss_delete_sec_context(&minor, &(*ctx)->context,
315 GSS_C_NO_BUFFER);
315 } 316 }
316 317
317 if (GSS_ERROR(major)) 318 if (GSS_ERROR(major))