etype_info_entry to KRB5_ETYPE_NO_SALT. Before copying salt into
etype_info_entry, test that salt length (from get_salt_from_key())
is not SALT_TYPE_NO_LENGTH.
* kdc_util.c (get_salt_from_key): Initialize salt type to
SALT_TYPE_NO_LENGTH (instead of -1).
* network.c (process_packet): Cast length in sendto() call to int.
git-svn-id: svn://anonsvn.mit.edu/krb5/trunk@12787
dc483132-0cff-0310-8789-
dd5450dbe970
+2000-10-17 Ezra Peisach <epeisach@mit.edu>
+
+ * kdc_preauth.c (get_etype_info): Initialize length of
+ etype_info_entry to KRB5_ETYPE_NO_SALT. Before copying salt into
+ etype_info_entry, test that salt length (from get_salt_from_key())
+ is not SALT_TYPE_NO_LENGTH.
+
+ * kdc_util.c (get_salt_from_key): Initialize salt type to
+ SALT_TYPE_NO_LENGTH (instead of -1).
+
+ * network.c (process_packet): Cast length in sendto() call to int.
+
2000-10-06 Tom Yu <tlyu@mit.edu>
* kerberos_v4.c (kerb_get_principal): Modify to take a pointer to
entry[i+1] = 0;
entry[i]->magic = KV5M_ETYPE_INFO_ENTRY;
entry[i]->etype = db_etype;
- entry[i]->length = -1;
+ entry[i]->length = KRB5_ETYPE_NO_SALT;
entry[i]->salt = 0;
retval = get_salt_from_key(context, request->client,
client_key, &salt);
if (retval)
goto cleanup;
- if (salt.length >= 0) {
+ if (salt.length >= 0 && salt.length != SALT_TYPE_NO_LENGTH) {
entry[i]->length = salt.length;
entry[i]->salt = salt.data;
salt.data = 0;
krb5_data * realm;
salt->data = 0;
- salt->length = -1;
+ salt->length = SALT_TYPE_NO_LENGTH;
if (client_key->key_data_ver == 1)
return 0;
com_err(prog, retval, "while dispatching");
return;
}
- cc = sendto(port_fd, response->data, response->length, 0,
+ cc = sendto(port_fd, response->data, (int) response->length, 0,
(struct sockaddr *)&saddr, saddr_len);
if (cc == -1) {
char addrbuf[46];