+Sat Oct 14 14:16:20 2000 Ezra Peisach <epeisach@mit.edu>
+
+ * kpropd.c, kprop.c: Ensure size of database sent OTW as 4 bytes
+ instead of sizeof(int).
+
2000-08-03 Ezra Peisach <epeisach@mit.edu>
* kprop.c, kpropd.c: Compiler warning fixes including: not
struct hostent *hp;
register struct servent *sp;
struct sockaddr_in my_sin;
- int socket_length;
+ unsigned int socket_length;
hp = gethostbyname(host);
if (hp == NULL) {
* will abort the entire operation.
*/
void
-xmit_database(context, auth_context, my_creds, fd, database_fd, database_size)
+xmit_database(context, auth_context, my_creds, fd, database_fd,
+ in_database_size)
krb5_context context;
krb5_auth_context auth_context;
krb5_creds *my_creds;
int fd;
int database_fd;
- int database_size;
+ int in_database_size;
{
- krb5_int32 send_size, sent_size, n;
+ krb5_int32 sent_size, n;
krb5_data inbuf, outbuf;
char buf[KPROP_BUFSIZ];
krb5_error_code retval;
krb5_error *error;
-
+ /* These must be 4 bytes */
+ krb5_ui_4 database_size = in_database_size;
+ krb5_ui_4 send_size;
+
/*
* Send over the size
*/
{
struct sockaddr_in my_sin, frominet;
struct servent *sp;
- int finet, fromlen, s;
+ int finet, s;
+ unsigned int fromlen;
int ret;
finet = socket(AF_INET, SOCK_STREAM, 0);
int fd;
{
struct sockaddr_in from;
- int on = 1, fromlen;
+ int on = 1;
+ unsigned int fromlen;
struct hostent *hp;
krb5_error_code retval;
krb5_data confmsg;
krb5_error_code retval;
krb5_ticket * ticket;
struct sockaddr_in r_sin;
- int sin_length;
+ unsigned int sin_length;
krb5_keytab keytab = NULL;
/*
int database_fd;
krb5_data *confmsg;
{
- int database_size;
+ krb5_ui_4 database_size; /* This must be 4 bytes */
int received_size, n;
char buf[1024];
krb5_data inbuf, outbuf;