aboutsummaryrefslogtreecommitdiff
path: root/lib/libgssapi/gss_inquire_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_inquire_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_inquire_context.c')
-rw-r--r--lib/libgssapi/gss_inquire_context.c33
1 files changed, 27 insertions, 6 deletions
diff --git a/lib/libgssapi/gss_inquire_context.c b/lib/libgssapi/gss_inquire_context.c
index 3f4531d2c428..c9f2a0c545ef 100644
--- a/lib/libgssapi/gss_inquire_context.c
+++ b/lib/libgssapi/gss_inquire_context.c
@@ -49,27 +49,43 @@ gss_inquire_context(OM_uint32 *minor_status,
struct _gss_name *name;
gss_name_t src_mn, targ_mn;
+ if (locally_initiated)
+ *locally_initiated = 0;
+ if (open)
+ *open = 0;
+ if (lifetime_rec)
+ *lifetime_rec = 0;
+
+ if (src_name)
+ *src_name = GSS_C_NO_NAME;
+ if (targ_name)
+ *targ_name = GSS_C_NO_NAME;
+ if (mech_type)
+ *mech_type = GSS_C_NO_OID;
+ src_mn = targ_mn = GSS_C_NO_NAME;
+
major_status = m->gm_inquire_context(minor_status,
ctx->gc_ctx,
- src_name ? &src_mn : 0,
- targ_name ? &targ_mn : 0,
+ src_name ? &src_mn : NULL,
+ targ_name ? &targ_mn : NULL,
lifetime_rec,
mech_type,
ctx_flags,
locally_initiated,
open);
- if (src_name) *src_name = 0;
- if (targ_name) *targ_name = 0;
-
if (major_status != GSS_S_COMPLETE) {
+ _gss_mg_error(m, major_status, *minor_status);
return (major_status);
}
if (src_name) {
name = _gss_make_name(m, src_mn);
if (!name) {
- minor_status = 0;
+ if (mech_type)
+ *mech_type = GSS_C_NO_OID;
+ m->gm_release_name(minor_status, &src_mn);
+ *minor_status = 0;
return (GSS_S_FAILURE);
}
*src_name = (gss_name_t) name;
@@ -78,6 +94,11 @@ gss_inquire_context(OM_uint32 *minor_status,
if (targ_name) {
name = _gss_make_name(m, targ_mn);
if (!name) {
+ if (mech_type)
+ *mech_type = GSS_C_NO_OID;
+ if (src_name)
+ gss_release_name(minor_status, src_name);
+ m->gm_release_name(minor_status, &src_mn);
minor_status = 0;
return (GSS_S_FAILURE);
}