From b27960518a165bcf33123cf8c00ef0ce3e3df4b7 Mon Sep 17 00:00:00 2001 From: Johan Danielsson Date: Mon, 10 Jun 1996 16:48:42 +0000 Subject: [PATCH] Return four-byte checksum. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@577 ec53bebd-3082-4978-b11e-865c3cabbd6b --- appl/ftp/ftpd/krb4.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/appl/ftp/ftpd/krb4.c b/appl/ftp/ftpd/krb4.c index dda6466bd..2348a4dde 100644 --- a/appl/ftp/ftpd/krb4.c +++ b/appl/ftp/ftpd/krb4.c @@ -61,9 +61,16 @@ int krb4_adat(char *auth) des_set_key(&auth_dat.session, schedule); - cs = htonl(auth_dat.checksum + 1); - len = krb_mk_safe(&cs, msg, sizeof(cs), &auth_dat.session, - &ctrl_addr, &his_addr); + cs = auth_dat.checksum + 1; + { + unsigned char tmp[4]; + tmp[0] = (cs >> 24) & 0xff; + tmp[1] = (cs >> 16) & 0xff; + tmp[2] = (cs >> 8) & 0xff; + tmp[3] = cs & 0xff; + len = krb_mk_safe(tmp, msg, 4, &auth_dat.session, + &ctrl_addr, &his_addr); + } if(len < 0){ reply(535, "Error creating reply: %s.", strerror(errno)); return -1;