summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordjm <djm>2006-08-30 01:08:04 +0000
committerdjm <djm>2006-08-30 01:08:04 +0000
commit1135d1a7870d4f4f2155791c4700dee37863713b (patch)
tree7a805510828a4a54f001079e38158964d1af58f6
parent048c61a57f671650b6cae6c848ca2cc1b0e3434c (diff)
downloadopenssh-1135d1a7870d4f4f2155791c4700dee37863713b.tar.gz
- 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@
-rw-r--r--ChangeLog8
-rw-r--r--gss-genr.c7
2 files changed, 11 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 866960a2..a194c1ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,12 @@
normalise some inconsistent (but harmless) NULL pointer checks
spotted by the Stanford SATURN tool, via Isil Dillig;
ok markus@ deraadt@
+ - 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@
20060824
- (dtucker) [openbsd-compat/basename.c] Include errno.h.
@@ -5315,4 +5321,4 @@
- (djm) Trim deprecated options from INSTALL. Mention UsePAM
- (djm) Fix quote handling in sftp; Patch from admorten AT umich.edu
-$Id: ChangeLog,v 1.4513 2006/08/30 01:07:39 djm Exp $
+$Id: ChangeLog,v 1.4514 2006/08/30 01:08:04 djm Exp $
diff --git a/gss-genr.c b/gss-genr.c
index e962942d..57f12a2d 100644
--- a/gss-genr.c
+++ b/gss-genr.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: gss-genr.c,v 1.16 2006/08/18 22:41:29 djm Exp $ */
+/* $OpenBSD: gss-genr.c,v 1.17 2006/08/29 12:02:30 dtucker Exp $ */
/*
* 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)
major = ssh_gssapi_init_ctx(*ctx, 0, GSS_C_NO_BUFFER, &token,
NULL);
gss_release_buffer(&minor, &token);
- gss_delete_sec_context(&minor, &(*ctx)->context,
- GSS_C_NO_BUFFER);
+ if ((*ctx)->context != GSS_C_NO_CONTEXT)
+ gss_delete_sec_context(&minor, &(*ctx)->context,
+ GSS_C_NO_BUFFER);
}
if (GSS_ERROR(major))