summaryrefslogtreecommitdiff
path: root/source4/heimdal/lib/gssapi/mech/gss_import_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/heimdal/lib/gssapi/mech/gss_import_name.c')
-rw-r--r--source4/heimdal/lib/gssapi/mech/gss_import_name.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/source4/heimdal/lib/gssapi/mech/gss_import_name.c b/source4/heimdal/lib/gssapi/mech/gss_import_name.c
index 9684301ba4..6f55a1d61c 100644
--- a/source4/heimdal/lib/gssapi/mech/gss_import_name.c
+++ b/source4/heimdal/lib/gssapi/mech/gss_import_name.c
@@ -27,7 +27,7 @@
*/
#include "mech_locl.h"
-RCSID("$Id: gss_import_name.c,v 1.3 2006/06/29 21:23:13 lha Exp $");
+RCSID("$Id: gss_import_name.c 19954 2007-01-17 11:50:23Z lha $");
static OM_uint32
_gss_import_export_name(OM_uint32 *minor_status,
@@ -119,6 +119,10 @@ _gss_import_export_name(OM_uint32 *minor_status,
*/
major_status = m->gm_import_name(minor_status,
input_name_buffer, GSS_C_NT_EXPORT_NAME, &new_canonical_name);
+ if (major_status != GSS_S_COMPLETE) {
+ _gss_mg_error(m, major_status, *minor_status);
+ return major_status;
+ }
/*
* Now we make a new name and mark it as an MN.
@@ -145,9 +149,10 @@ gss_import_name(OM_uint32 *minor_status,
OM_uint32 major_status;
struct _gss_name *name;
+ *output_name = GSS_C_NO_NAME;
+
if (input_name_buffer->length == 0) {
*minor_status = 0;
- *output_name = 0;
return (GSS_S_BAD_NAME);
}
@@ -180,7 +185,6 @@ gss_import_name(OM_uint32 *minor_status,
&& !gss_oid_equal(name_type, GSS_C_NT_ANONYMOUS)
&& !gss_oid_equal(name_type, GSS_KRB5_NT_PRINCIPAL_NAME)) {
*minor_status = 0;
- *output_name = 0;
return (GSS_S_BAD_NAMETYPE);
}