[tac_plus] Re: tacacs+ 64 bit fix

john heasley heas at shrubbery.net
Thu Nov 5 22:18:19 UTC 2009


Thu, Nov 05, 2009 at 02:01:18PM -0700, Schmidt, Daniel:
> ILP64 defines int as 64 bits
> 
> http://www.ibm.com/developerworks/library/l-port64.html

sigh.  never seen ILP64.  the great thing about standards is that there
are so many choose from.

anyway, does anything actually use ILP64?  does anything use SILP64?  It
sems that there are many other things that'd need to be fixed if either
of these models are used [in anything we care about].

> -----Original Message-----
> From: tac_plus-bounces at shrubbery.net
> [mailto:tac_plus-bounces at shrubbery.net] On Behalf Of john heasley
> Sent: Thursday, November 05, 2009 12:39 PM
> To: Stephen Hemminger
> Cc: tac_plus at shrubbery.net
> Subject: [tac_plus] Re: tacacs+ 64 bit fix
> 
> Thu, Nov 05, 2009 at 11:22:04AM -0800, Stephen Hemminger:
> > If tacacs+ server is compiled and run on 64 bit machine (common now).
> > On these machines sizeof(int) == 8 bytes, which is not same as uint32.
> > It will fail because the session_id which is declared as int will
> encrypted
> > as a 64 bit value. 
> 
> thats not right.  int should be 4 bytes on all machines as defined by
> spec.  long should be 8 bytes on 64bit machines.
> 
> what o/s and what version of tacacs?
> 
> > >From fe31e5361c9e51096dacbc8c1f54b2a59366d3d1 Mon Sep 17 00:00:00
> 2001
> > From: Stephen Hemminger <shemminger at s6510.(none)>
> > Date: Thu, 5 Nov 2009 11:19:29 -0800
> > Subject: [PATCH] fix encrypt on 64 bit
> > 
> > ---
> >  encrypt.c |    7 ++++---
> >  1 files changed, 4 insertions(+), 3 deletions(-)
> > 
> > diff --git a/encrypt.c b/encrypt.c
> > index a0971d0..2a5a341 100644
> > --- a/encrypt.c
> > +++ b/encrypt.c
> > @@ -37,9 +37,10 @@
> >   *
> >   *
> >   */
> > -void
> > -create_md5_hash(int session_id, char *key, u_char version, u_char
> seq_no,
> > -		u_char *prev_hash, u_char *hash)
> > +static void
> > +create_md5_hash(uint32_t session_id, const char *key, 
> > +		u_char version, u_char seq_no,
> > +		const u_char *prev_hash, u_char *hash)
> >  {
> >      u_char *md_stream, *mdp;
> >      int md_len;
> > -- 
> > 1.6.3.3
> > 
> > _______________________________________________
> > tac_plus mailing list
> > tac_plus at shrubbery.net
> > http://www.shrubbery.net/mailman/listinfo.cgi/tac_plus
> _______________________________________________
> tac_plus mailing list
> tac_plus at shrubbery.net
> http://www.shrubbery.net/mailman/listinfo.cgi/tac_plus


More information about the tac_plus mailing list