+2004-05-24 Ezra Peisach <epeisach@mit.edu>
+
+ * t_ser.c (ser_keytab_test): Cleanup memory leak of forgetting to
+ close keytab.
+
+ * chpw.c: Add parenthesis around assignments in conditionals.
+
2004-05-12 Jeffrey Altman <jaltman@mit.edu>
* send_tgs.c: krb5_send_tgs() was broken in the case of a KRB_ERROR
krb5_data *encoded_setpw;
char *ptr;
- int count = 2;
cipherpw.data = NULL;
cipherpw.length = 0;
- if (ret = krb5_auth_con_setflags(context, auth_context,
- KRB5_AUTH_CONTEXT_DO_SEQUENCE))
+ if ((ret = krb5_auth_con_setflags(context, auth_context,
+ KRB5_AUTH_CONTEXT_DO_SEQUENCE)))
return(ret);
ret = encode_krb5_setpw_req(targprinc, passwd, &encoded_setpw);
krb5_error_code ret;
krb5_data cipherresult;
krb5_data clearresult;
- krb5_replay_data replay;
krb5_keyblock *tmpkey;
/*
** validate the packet length -
*/
if (krb5_is_krb_error(packet)) {
krb5_error *krberror;
- if (ret = krb5_rd_error(context, packet, &krberror))
+ if ((ret = krb5_rd_error(context, packet, &krberror)))
return(ret);
if (krberror->e_data.data == NULL) {
- ret = ERROR_TABLE_BASE_krb5 + krberror->error;
+ ret = ERROR_TABLE_BASE_krb5 + (krb5_error_code) krberror->error;
krb5_free_error(context, krberror);
return (ret);
}
sprintf(ccname, "WRFILE:temp_kt_%d", (int) getpid());
if ((kret = krb5_kt_resolve(kcontext, ccname, &keytab)))
kret = krb5_kt_register(kcontext, &krb5_ktf_writable_ops);
+ else
+ kret = krb5_kt_close(kcontext, keytab);
if (!kret &&
!(kret = krb5_kt_resolve(kcontext, ccname, &keytab)) &&
!(kret = ser_data(verbose, "> Resolved WRFILE keytab",