+2002-07-01 Ken Raeburn <raeburn@mit.edu>
+
+ * accept_sec_context.c (rd_and_store_for_creds): Extra parens
+ around assignments to quiet gcc.
+ (krb5_gss_accept_sec_context): Fix some type mismatches between
+ OM_uint32 and krb5_error_code.
+ * k5unseal.c (kg_unseal_v1): Move a variable declaration and
+ assignment to fix gcc "possibly uninitialized" warning.
+
2002-03-03 Sam Hartman <hartmans@mit.edu>
* accept_sec_context.c (rd_and_store_for_creds): Patch from Steven
krb5_auth_context new_auth_ctx = NULL;
krb5_int32 flags_org;
- if (retval = krb5_auth_con_getflags(context, auth_context, &flags_org))
+ if ((retval = krb5_auth_con_getflags(context, auth_context, &flags_org)))
return retval;
krb5_auth_con_setflags(context, auth_context,
KRB5_AUTH_CONTEXT_DO_SEQUENCE);
* containing the KRB_CRED message does get encrypted.)
*/
if (krb5_rd_cred(context, auth_context, inbuf, &creds, NULL)) {
- if (retval = krb5_auth_con_init(context, &new_auth_ctx))
+ if ((retval = krb5_auth_con_init(context, &new_auth_ctx)))
goto cleanup;
krb5_auth_con_setflags(context, new_auth_ctx, 0);
- if (retval = krb5_rd_cred(context, new_auth_ctx, inbuf, &creds, NULL))
+ if ((retval = krb5_rd_cred(context, new_auth_ctx, inbuf, &creds, NULL)))
goto cleanup;
}
/* handle default cred handle */
if (verifier_cred_handle == GSS_C_NO_CREDENTIAL) {
- major_status = krb5_gss_acquire_cred(&code, GSS_C_NO_NAME,
+ major_status = krb5_gss_acquire_cred(minor_status, GSS_C_NO_NAME,
GSS_C_INDEFINITE, GSS_C_NO_OID_SET,
GSS_C_ACCEPT, &cred_handle,
NULL, NULL);
- if (major_status != GSS_S_COMPLETE)
+ if (major_status != GSS_S_COMPLETE) {
+ code = *minor_status;
goto fail;
+ }
} else {
cred_handle = verifier_cred_handle;
}
- major_status = krb5_gss_validate_cred(&code, verifier_cred_handle);
- if (GSS_ERROR(major_status))
+ major_status = krb5_gss_validate_cred(minor_status, verifier_cred_handle);
+ if (GSS_ERROR(major_status)) {
+ code = *minor_status;
goto fail;
+ }
cred = (krb5_gss_cred_id_t) cred_handle;
int toktype;
{
krb5_error_code code;
- int tmsglen;
int conflen = 0;
int signalg;
int sealalg;
return GSS_S_DEFECTIVE_TOKEN;
}
- if (toktype == KG_TOK_SEAL_MSG)
- tmsglen = bodysize-(14+cksum_len);
-
/* get the token parameters */
if ((code = kg_get_seq_num(context, ctx->seq, ptr+14, ptr+6, &direction,
/* decode the message, if SEAL */
if (toktype == KG_TOK_SEAL_MSG) {
+ int tmsglen = bodysize-(14+cksum_len);
if (sealalg != 0xffff) {
if ((plain = (unsigned char *) xmalloc(tmsglen)) == NULL) {
*minor_status = ENOMEM;