aboutsummaryrefslogtreecommitdiff
path: root/lib/libgssapi/gss_export_name.c
diff options
context:
space:
mode:
authorDoug Rabson <dfr@FreeBSD.org>2008-05-07 13:53:12 +0000
committerDoug Rabson <dfr@FreeBSD.org>2008-05-07 13:53:12 +0000
commit33f12199250a09b573f7a518b523fdac3f120b8f (patch)
tree1338a6c0e5d3e7c3b0da720ac15cd79fc72c6b5a /lib/libgssapi/gss_export_name.c
parent4fe54d7c6acb302aacc6ac18798804b26c882c13 (diff)
downloadsrc-33f12199250a09b573f7a518b523fdac3f120b8f.tar.gz
src-33f12199250a09b573f7a518b523fdac3f120b8f.zip
Fix conflicts after heimdal-1.1 import and add build infrastructure. Import
all non-style changes made by heimdal to our own libgssapi.
Notes
Notes: svn path=/head/; revision=178828
Diffstat (limited to 'lib/libgssapi/gss_export_name.c')
-rw-r--r--lib/libgssapi/gss_export_name.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/lib/libgssapi/gss_export_name.c b/lib/libgssapi/gss_export_name.c
index 6cba2f8c380b..49174bbcafd0 100644
--- a/lib/libgssapi/gss_export_name.c
+++ b/lib/libgssapi/gss_export_name.c
@@ -30,6 +30,7 @@
#include "mech_switch.h"
#include "name.h"
+#include "utils.h"
OM_uint32
gss_export_name(OM_uint32 *minor_status,
@@ -39,8 +40,7 @@ gss_export_name(OM_uint32 *minor_status,
struct _gss_name *name = (struct _gss_name *) input_name;
struct _gss_mechanism_name *mn;
- exported_name->value = NULL;
- exported_name->length = 0;
+ _gss_buffer_zero(exported_name);
/*
* If this name already has any attached MNs, export the first
@@ -48,12 +48,9 @@ gss_export_name(OM_uint32 *minor_status,
* list.
*/
mn = SLIST_FIRST(&name->gn_mn);
- if (!mn)
- mn = _gss_find_mn(name,
- &SLIST_FIRST(&_gss_mechs)->gm_mech_oid);
if (!mn) {
*minor_status = 0;
- return (GSS_S_BAD_MECH);
+ return (GSS_S_NAME_NOT_MN);
}
return mn->gmn_mech->gm_export_name(minor_status,