(gss_accept_sec_context): handle the case where ret_flags == NULL
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17765 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -41,7 +41,7 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status,
|
||||
OM_uint32 *time_rec,
|
||||
gss_cred_id_t *delegated_cred_handle)
|
||||
{
|
||||
OM_uint32 major_status;
|
||||
OM_uint32 major_status, mech_ret_flags;
|
||||
gssapi_mech_interface m;
|
||||
struct _gss_context *ctx = (struct _gss_context *) *context_handle;
|
||||
struct _gss_cred *cred = (struct _gss_cred *) acceptor_cred_handle;
|
||||
@@ -150,6 +150,7 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status,
|
||||
}
|
||||
delegated_mc = GSS_C_NO_CREDENTIAL;
|
||||
|
||||
mech_ret_flags = 0;
|
||||
major_status = m->gm_accept_sec_context(minor_status,
|
||||
&ctx->gc_ctx,
|
||||
acceptor_mc,
|
||||
@@ -158,7 +159,7 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status,
|
||||
&src_mn,
|
||||
mech_type,
|
||||
output_token,
|
||||
ret_flags,
|
||||
&mech_ret_flags,
|
||||
time_rec,
|
||||
&delegated_mc);
|
||||
if (major_status != GSS_S_COMPLETE &&
|
||||
@@ -180,7 +181,7 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status,
|
||||
*src_name = (gss_name_t) name;
|
||||
}
|
||||
|
||||
if (*ret_flags & GSS_C_DELEG_FLAG) {
|
||||
if (mech_ret_flags & GSS_C_DELEG_FLAG) {
|
||||
if (!delegated_cred_handle) {
|
||||
m->gm_release_cred(minor_status, &delegated_mc);
|
||||
*ret_flags &= ~GSS_C_DELEG_FLAG;
|
||||
@@ -210,6 +211,8 @@ OM_uint32 gss_accept_sec_context(OM_uint32 *minor_status,
|
||||
}
|
||||
}
|
||||
|
||||
if (ret_flags)
|
||||
*ret_flags = mech_ret_flags;
|
||||
*context_handle = (gss_ctx_id_t) ctx;
|
||||
return (major_status);
|
||||
}
|
||||
|
Reference in New Issue
Block a user