gssapi: import bugfixes from Apple Heimdal-520
* check `ctx->gc_ctx` in `gss_inquire_context()` * check `gm_inquire_cred != NULL` in `gss_inquire_context()` * check `min_lifetime` in `gss_inquire_cred()` * check `gm_inquire_cred_by_mech != NULL` in `gss_inquire_cred_by_mech()` * set mech error in `gss_inquire_cred_by_oid()` * don't clobber error in `gss_inquire_cred_by_oid()` * don't pass NULL minor_status to `gss_krb5_free_lucid_sec_context()` * allow NULL ccache in `gss_krb5_ccache_name()` * NULL names OK in `_gss_find_mn()` * allow empty names in `gss_import_name()` (removes `input_name_buffer` length check). to support ANONYMOUS. in `gss_import_name()`, ignore mech name import failure as long as it's possible to import the name in some other mechanism * better argument validation in `gss_export_sec_context()` * in `gss_compare_name()`, check `mn2 != NULL` * check `gss_add_oid_set_member()` return code in `gss_indicate_mechs()` * in `gss_destroy_cred()`, set output cred handle to `GSS_C_NO_CREDENTIAL` * cast size_t to OM_uint32 where required
This commit is contained in:
@@ -41,7 +41,7 @@ gss_inquire_context(OM_uint32 *minor_status,
|
||||
{
|
||||
OM_uint32 major_status;
|
||||
struct _gss_context *ctx = (struct _gss_context *) context_handle;
|
||||
gssapi_mech_interface m = ctx->gc_mech;
|
||||
gssapi_mech_interface m;
|
||||
struct _gss_name *name;
|
||||
gss_name_t src_mn, targ_mn;
|
||||
|
||||
@@ -60,6 +60,13 @@ gss_inquire_context(OM_uint32 *minor_status,
|
||||
*mech_type = GSS_C_NO_OID;
|
||||
src_mn = targ_mn = GSS_C_NO_NAME;
|
||||
|
||||
if (ctx == NULL || ctx->gc_ctx == NULL) {
|
||||
*minor_status = 0;
|
||||
return GSS_S_NO_CONTEXT;
|
||||
}
|
||||
|
||||
m = ctx->gc_mech;
|
||||
|
||||
major_status = m->gm_inquire_context(minor_status,
|
||||
ctx->gc_ctx,
|
||||
src_name ? &src_mn : NULL,
|
||||
|
Reference in New Issue
Block a user