aboutsummaryrefslogtreecommitdiff
path: root/lib/libgssapi/gss_export_sec_context.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_sec_context.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_sec_context.c')
-rw-r--r--lib/libgssapi/gss_export_sec_context.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/libgssapi/gss_export_sec_context.c b/lib/libgssapi/gss_export_sec_context.c
index 71c6874e963d..a600f280048f 100644
--- a/lib/libgssapi/gss_export_sec_context.c
+++ b/lib/libgssapi/gss_export_sec_context.c
@@ -33,6 +33,7 @@
#include "mech_switch.h"
#include "context.h"
+#include "utils.h"
OM_uint32
gss_export_sec_context(OM_uint32 *minor_status,
@@ -44,6 +45,8 @@ gss_export_sec_context(OM_uint32 *minor_status,
struct _gss_mech_switch *m = ctx->gc_mech;
gss_buffer_desc buf;
+ _gss_buffer_zero(interprocess_token);
+
major_status = m->gm_export_sec_context(minor_status,
&ctx->gc_ctx, &buf);
@@ -63,6 +66,7 @@ gss_export_sec_context(OM_uint32 *minor_status,
* GSS_C_NO_CONTEXT, which we did above.
* Return GSS_S_FAILURE.
*/
+ _gss_buffer_zero(interprocess_token);
*minor_status = ENOMEM;
return (GSS_S_FAILURE);
}
@@ -72,6 +76,8 @@ gss_export_sec_context(OM_uint32 *minor_status,
memcpy(p + 2, m->gm_mech_oid.elements, m->gm_mech_oid.length);
memcpy(p + 2 + m->gm_mech_oid.length, buf.value, buf.length);
gss_release_buffer(minor_status, &buf);
+ } else {
+ _gss_mg_error(m, major_status, *minor_status);
}
return (major_status);