+2000-10-17 Ezra Peisach <epeisach@mit.edu>
+
+ * encode.c, krb524.h: encode_v4tkt() and decode_v4tkt() now take
+ unsigned int * lengths.
+
+ * krb524d.c (do_connection): Cast length fields in recvfrom() and
+ sendto() calls to int.
+
+ * sendmsg.c (krb524_sendto_kdc): Cast length fields in recv() and
+ send() calls to int.
+
2000-10-06 Tom Yu <tlyu@mit.edu>
* conv_creds.c (krb524_convert_creds_plain): Use time_to_life()
* the wheel is hidden.
*/
-int encode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, int *)),
+int encode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, unsigned int *)),
encode_ktext KRB5_PROTOTYPE((char **, int *, KTEXT_ST *)),
encode_bytes KRB5_PROTOTYPE((char **, int *, char *, int)),
encode_int32 KRB5_PROTOTYPE((char **, int *, krb5_int32 *));
-int decode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, int *)),
+int decode_v4tkt KRB5_PROTOTYPE((KTEXT_ST *, char *, unsigned int *)),
decode_ktext KRB5_PROTOTYPE((char **, int *, KTEXT_ST *)),
decode_bytes KRB5_PROTOTYPE((char **, int *, char *, int)),
decode_int32 KRB5_PROTOTYPE((char **, int *, krb5_int32 *));
int encode_v4tkt(v4tkt, buf, encoded_len)
KTEXT_ST *v4tkt;
char *buf;
- int *encoded_len;
+ unsigned int *encoded_len;
{
int buflen, ret;
int decode_v4tkt(v4tkt, buf, encoded_len)
KTEXT_ST *v4tkt;
char *buf;
- int *encoded_len;
+ unsigned int *encoded_len;
{
int buflen, ret;
/* encode.c */
int encode_v4tkt
- KRB5_PROTOTYPE((KTEXT_ST *v4tkt, char *buf, int *encoded_len));
+ KRB5_PROTOTYPE((KTEXT_ST *v4tkt, char *buf, unsigned int *encoded_len));
int decode_v4tkt
- KRB5_PROTOTYPE((KTEXT_ST *v4tkt, char *buf, int *encoded_len));
+ KRB5_PROTOTYPE((KTEXT_ST *v4tkt, char *buf, unsigned int *encoded_len));
/* misc.c */
msgdata.length = MSGSIZE;
saddrlen = sizeof(struct sockaddr);
- ret = recvfrom(s, msgdata.data, msgdata.length, 0, &saddr, &saddrlen);
+ ret = recvfrom(s, msgdata.data, (int) msgdata.length, 0, &saddr, &saddrlen);
if (ret < 0) {
/* if recvfrom fails, we probably don't have a valid saddr to
use for the reply, so don't even try to respond. */
write_msg:
if (ret)
- (void) sendto(s, msgdata.data, msgdata.length, 0, &saddr, saddrlen);
+ (void) sendto(s, msgdata.data, (int) msgdata.length, 0, &saddr, saddrlen);
else
if (sendto(s, msgdata.data, msgdata.length, 0, &saddr, saddrlen)<0)
ret = errno;
continue;
}
if (send(socklist[host],
- message->data, message->length, 0) != message->length)
+ message->data, (int) message->length, 0) != message->length)
continue;
retry:
waitlen.tv_usec = 0;
goto out;
}
if ((cc = recv(socklist[host],
- reply->data, reply->length, 0)) == SOCKET_ERROR)
+ reply->data, (int) reply->length, 0)) == SOCKET_ERROR)
{
/* man page says error could be:
EBADF: won't happen