diff options
Diffstat (limited to 'proxy/src')
-rw-r--r-- | proxy/src/client/gpm_acquire_cred.c | 11 | ||||
-rw-r--r-- | proxy/src/mechglue/gpp_creds.c | 13 | ||||
-rw-r--r-- | proxy/src/mechglue/gpp_init_sec_context.c | 3 |
3 files changed, 13 insertions, 14 deletions
diff --git a/proxy/src/client/gpm_acquire_cred.c b/proxy/src/client/gpm_acquire_cred.c index 2b2c6c3..8f1cade 100644 --- a/proxy/src/client/gpm_acquire_cred.c +++ b/proxy/src/client/gpm_acquire_cred.c @@ -281,8 +281,8 @@ OM_uint32 gpm_inquire_cred(OM_uint32 *minor_status, gssx_name *dname = NULL; gssx_cred_element *e; gss_OID_desc tmp_oid; - uint32_t ret_min; - uint32_t ret_maj; + uint32_t ret_min = 0; + uint32_t ret_maj = GSS_S_COMPLETE; uint32_t life; int cu; int i; @@ -403,8 +403,8 @@ OM_uint32 gpm_inquire_cred_by_mech(OM_uint32 *minor_status, gssx_name *dname = NULL; gssx_cred_element *e; gss_OID_desc tmp_oid; - uint32_t ret_min; - uint32_t ret_maj; + uint32_t ret_min = 0; + uint32_t ret_maj = GSS_S_COMPLETE; int i; if (!cred) { @@ -465,8 +465,7 @@ OM_uint32 gpm_inquire_cred_by_mech(OM_uint32 *minor_status, } if (i >= cred->elements.elements_len) { - *minor_status = 0; - return GSS_S_FAILURE; + ret_maj = GSS_S_FAILURE; } done: diff --git a/proxy/src/mechglue/gpp_creds.c b/proxy/src/mechglue/gpp_creds.c index 7da2237..d9c18fe 100644 --- a/proxy/src/mechglue/gpp_creds.c +++ b/proxy/src/mechglue/gpp_creds.c @@ -63,18 +63,17 @@ OM_uint32 gppint_get_def_creds(OM_uint32 *minor_status, struct gpp_cred_handle **cred_handle) { struct gpp_cred_handle *cred; - OM_uint32 tmaj, tmin; - OM_uint32 maj, min; + OM_uint32 tmaj = GSS_S_COMPLETE; + OM_uint32 tmin = 0; + OM_uint32 maj = GSS_S_FAILURE; + OM_uint32 min = 0; cred = calloc(1, sizeof(struct gpp_cred_handle)); if (!cred) { - *minor_status = 0; - return GSS_S_FAILURE; + min = ENOMEM; + goto done; } - tmaj = GSS_S_COMPLETE; - tmin = 0; - /* See if we should try local first */ if (behavior == GPP_LOCAL_ONLY || behavior == GPP_LOCAL_FIRST) { diff --git a/proxy/src/mechglue/gpp_init_sec_context.c b/proxy/src/mechglue/gpp_init_sec_context.c index fc0489f..1b233a7 100644 --- a/proxy/src/mechglue/gpp_init_sec_context.c +++ b/proxy/src/mechglue/gpp_init_sec_context.c @@ -82,7 +82,7 @@ OM_uint32 gssi_init_sec_context(OM_uint32 *minor_status, OM_uint32 *ret_flags, OM_uint32 *time_rec) { - enum gpp_behavior behavior; + enum gpp_behavior behavior = GPP_UNINITIALIZED; struct gpp_context_handle *ctx_handle = NULL; struct gpp_cred_handle *cred_handle = NULL; struct gpp_name_handle *name; @@ -100,6 +100,7 @@ OM_uint32 gssi_init_sec_context(OM_uint32 *minor_status, if (mech_type == GSS_C_NO_OID || gpp_is_special_oid(mech_type)) { maj = GSS_S_BAD_MECH; + min = 0; goto done; } |