Only allow exporting MN, reset exported_name.
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@17805 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -37,18 +37,18 @@ gss_export_name(OM_uint32 *minor_status,
|
|||||||
struct _gss_name *name = (struct _gss_name *) input_name;
|
struct _gss_name *name = (struct _gss_name *) input_name;
|
||||||
struct _gss_mechanism_name *mn;
|
struct _gss_mechanism_name *mn;
|
||||||
|
|
||||||
|
exported_name->value = NULL;
|
||||||
|
exported_name->length = 0;
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* If this name already has any attached MNs, export the first
|
* If this name already has any attached MNs, export the first
|
||||||
* one, otherwise export based on the first mechanism in our
|
* one, otherwise export based on the first mechanism in our
|
||||||
* list.
|
* list.
|
||||||
*/
|
*/
|
||||||
mn = SLIST_FIRST(&name->gn_mn);
|
mn = SLIST_FIRST(&name->gn_mn);
|
||||||
if (!mn)
|
|
||||||
mn = _gss_find_mn(name,
|
|
||||||
&SLIST_FIRST(&_gss_mechs)->gm_mech_oid);
|
|
||||||
if (!mn) {
|
if (!mn) {
|
||||||
*minor_status = 0;
|
*minor_status = 0;
|
||||||
return (GSS_S_BAD_MECH);
|
return (GSS_S_NAME_NOT_MN);
|
||||||
}
|
}
|
||||||
|
|
||||||
return mn->gmn_mech->gm_export_name(minor_status,
|
return mn->gmn_mech->gm_export_name(minor_status,
|
||||||
|
Reference in New Issue
Block a user