summaryrefslogtreecommitdiffstats
path: root/crypto/heimdal/lib/gssapi/display_name.c
diff options
context:
space:
mode:
Diffstat (limited to 'crypto/heimdal/lib/gssapi/display_name.c')
-rw-r--r--crypto/heimdal/lib/gssapi/display_name.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/crypto/heimdal/lib/gssapi/display_name.c b/crypto/heimdal/lib/gssapi/display_name.c
index 4efed14..1c25e67 100644
--- a/crypto/heimdal/lib/gssapi/display_name.c
+++ b/crypto/heimdal/lib/gssapi/display_name.c
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 1997 Kungliga Tekniska Högskolan
+ * Copyright (c) 1997 - 2001 Kungliga Tekniska Högskolan
* (Royal Institute of Technology, Stockholm, Sweden).
* All rights reserved.
*
@@ -33,7 +33,7 @@
#include "gssapi_locl.h"
-RCSID("$Id: display_name.c,v 1.5 1999/12/02 17:05:03 joda Exp $");
+RCSID("$Id: display_name.c,v 1.7 2001/05/11 09:16:46 assar Exp $");
OM_uint32 gss_display_name
(OM_uint32 * minor_status,
@@ -50,13 +50,17 @@ OM_uint32 gss_display_name
kret = krb5_unparse_name (gssapi_krb5_context,
input_name,
&buf);
- if (kret)
+ if (kret) {
+ *minor_status = kret;
+ gssapi_krb5_set_error_string ();
return GSS_S_FAILURE;
+ }
len = strlen (buf);
output_name_buffer->length = len;
output_name_buffer->value = malloc(len + 1);
if (output_name_buffer->value == NULL) {
free (buf);
+ *minor_status = ENOMEM;
return GSS_S_FAILURE;
}
memcpy (output_name_buffer->value, buf, len);
OpenPOWER on IntegriCloud