Reset out variables.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@19950 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -49,6 +49,14 @@ gss_acquire_cred(OM_uint32 *minor_status,
|
||||
OM_uint32 min_time, cred_time;
|
||||
int i;
|
||||
|
||||
*minor_status = 0;
|
||||
if (actual_mechs)
|
||||
*output_cred_handle = GSS_C_NO_CREDENTIAL;
|
||||
if (actual_mechs)
|
||||
*actual_mechs = GSS_C_NO_OID_SET;
|
||||
if (time_rec)
|
||||
*time_rec = 0;
|
||||
|
||||
_gss_load_mech();
|
||||
|
||||
/*
|
||||
@@ -64,7 +72,6 @@ gss_acquire_cred(OM_uint32 *minor_status,
|
||||
break;
|
||||
}
|
||||
if (i == mechs->count) {
|
||||
*output_cred_handle = 0;
|
||||
*minor_status = 0;
|
||||
return (GSS_S_BAD_MECH);
|
||||
}
|
||||
@@ -151,7 +158,6 @@ gss_acquire_cred(OM_uint32 *minor_status,
|
||||
free(cred);
|
||||
if (actual_mechs)
|
||||
gss_release_oid_set(minor_status, actual_mechs);
|
||||
*output_cred_handle = 0;
|
||||
*minor_status = 0;
|
||||
return (GSS_S_NO_CRED);
|
||||
}
|
||||
|
@@ -93,8 +93,14 @@ gss_add_cred(OM_uint32 *minor_status,
|
||||
struct _gss_mechanism_name *mn;
|
||||
OM_uint32 junk;
|
||||
|
||||
*output_cred_handle = 0;
|
||||
*minor_status = 0;
|
||||
*output_cred_handle = GSS_C_NO_CREDENTIAL;
|
||||
if (initiator_time_rec)
|
||||
*initiator_time_rec = 0;
|
||||
if (acceptor_time_rec)
|
||||
*acceptor_time_rec = 0;
|
||||
if (actual_mechs)
|
||||
*actual_mechs = GSS_C_NO_OID_SET;
|
||||
|
||||
new_cred = malloc(sizeof(struct _gss_cred));
|
||||
if (!new_cred) {
|
||||
|
@@ -71,6 +71,14 @@ gss_init_sec_context(OM_uint32 * minor_status,
|
||||
|
||||
*minor_status = 0;
|
||||
|
||||
_mg_buffer_zero(output_token);
|
||||
if (actual_mech_type)
|
||||
*actual_mech_type = GSS_C_NO_OID;
|
||||
if (ret_flags)
|
||||
*ret_flags = 0;
|
||||
if (time_rec)
|
||||
*time_rec = 0;
|
||||
|
||||
/*
|
||||
* If we haven't allocated a context yet, do so now and lookup
|
||||
* the mechanism switch table. If we have one already, make
|
||||
|
Reference in New Issue
Block a user