[544] in Kerberos-V5-bugs

home help back first fref pref prev next nref lref last post

Another minor bug in v4admind

daemon@ATHENA.MIT.EDU (grossa@SDSC.EDU)
Wed Jun 29 22:22:26 1994

Date: Wed, 29 Jun 94 19:06:13 PDT
From: grossa@SDSC.EDU
To: krb5-bugs@MIT.EDU
Cc: kerberos@MIT.EDU

Hello,

   When I run v4admind and use the Kerberos 4 kpasswd client, I
get the error message:

    Jun 29 17:53:57 dark ./v4kadmind[8490]: processing request:
	Checksum does not match

   I replaced the #defines of four_bytes_vax_to_nets and
two_bytes_vax_to_nets in lib/des425/quad_cksum.c with the
corresponding subroutines from the Kerberos 4 distribution (from
the MSBFIRST part of the #ifdef).  This fixes the checksum problem.

   I'm sorry I don't have a patch for this, but I'm not sure what to
use as the test for big/little endian-ness.

Andrew Gross
=========================================================================
Comment these out:

#define four_bytes_vax_to_nets(x) (((x[3]<<8|x[2])<<8|x[1]<<8)|x[0])
#define two_bytes_vax_to_nets(x) ((x[1]<<8)|x[0])

And add these:

static unsigned short two_bytes_vax_to_nets(p)
    char *p;
{
    union {
        char pieces[2];
        unsigned short result;
    } short_conv;

    short_conv.pieces[0] = p[1];
    short_conv.pieces[1] = p[0];
    return(short_conv.result);
}

static unsigned int four_bytes_vax_to_nets(p)
    char *p;
{
    static union {
        char pieces[4];
        unsigned int result;
    } long_conv;

    long_conv.pieces[0] = p[3];
    long_conv.pieces[1] = p[2];
    long_conv.pieces[2] = p[1];
    long_conv.pieces[3] = p[0];
    return(long_conv.result);
}


home help back first fref pref prev next nref lref last post