[7861] in Kerberos

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

Re: [Doug Engert: KRB5B6 on HPUX 9.05]

daemon@ATHENA.MIT.EDU (Glenn Machin)
Mon Aug 26 09:59:42 1996

From: Glenn Machin <gmachin@sahp044.sandia.gov>
To: kdrenard@ARL.MIL (Kenneth D. Renard)
Date: Mon, 26 Aug 96 7:43:05 MDT
Cc: authf@es.net, asci-dce@lanl.gov, kerberos@MIT.EDU
In-Reply-To:  <9608231549.aa24353@SMOKEY.ARL.MIL>; from "Kenneth D. Renard" at Aug 23, 96 3:49 pm


The problem as we discovered was not with the krb5_calculate_checksum
but with the krb5_x macro.

The krb5_x macro is defined in krb5.h as :

#if 1
#define krb5_x(ptr,args) ((ptr)?((*(ptr)) args):(abort(),1))
#define krb5_xc(ptr,args) ((ptr)?((*(ptr)) args):(abort(),(char*)0))
#else
#define krb5_x(ptr,args) ((*(ptr)) args)
#define krb5_xc(ptr,args) ((*(ptr)) args)
#endif


Under the hpux compiler the if 1 branch is taken, and the
krb5_calculate_checksum core dumps. When forced to use the definition,

#define krb5_x(ptr,args) ((*(ptr)) args)

things work fine. I'm sure the gcc compiler properly expands this macro
while hpux does not.

Glenn

> 
> This is the same problem I was having with compiling the B6 code for
> rlogin (and telnet).  I was using the HPUX compiler.
> 
> >> 10 striker.arl.mil> /usr/bsd/rsh wargame uname -a
> >> HP-UX wargame A.09.05 A 9000/715 2000977976 two-user license
> 
> 
> The macro:
> 
> #define krb5_calculate_checksum(context, ctype, in, in_length, seed,
> seed_length,outcksum) krb5_x(((*krb5_cksumarray[ctype]->sum_func)),
> (in, in_length,seed,seed_length, outcksum))
> 
> failed to point to the correct (sum_func)().  All the info in the
> *krb5_cksumarray[ctype] looked okay, except for the pointers to
> the (sum_func)() and the (verify_func)().  I next step would be to
> try gcc or a different linker to make sure the definition of
> krb5_cksumarray[] in cryptoconf.c was linked correctly.
> 
> I think Doug is on the right track w/ gcc.
> 
> -Ken Renard
> 
> BTW:  I am noticing a few incompatiblilties w/ rlogin and ticket forwarding
> using a Beta3 client with a Beta6 server.  Specifically with server checksum
> verification error and ticket forwarding addressing failures.  If you run
> into these problems w/ using Beta6 code in a Beta2 environment, I can send
> you details and/or patches.
> 
> 
> -Ken Renard
> 
> 
> ----- Forwarded message # 1:
> 
> Received: from wharf.arl.mil by SMOKEY.ARL.MIL id aa22913; 23 Aug 96 15:09 EDT
> Received: from osi-west.es.net by wharf.arl.mil id aa19243; 23 Aug 96 15:09 EDT
> Received: from achilles.ctd.anl.gov by osi-west.es.net with ESnet SMTP (PP);
>           Fri, 23 Aug 1996 12:06:46 -0700
> Received: from pembroke.ctd.anl.gov (pembroke.ctd.anl.gov [146.137.64.73]) 
>           by achilles.ctd.anl.gov (8.6.11/8.6.11) with ESMTP id OAA11845;
>           Fri, 23 Aug 1996 14:06:45 -0500
> Received: (b17783@localhost) by pembroke.ctd.anl.gov (8.6.11/8.6.11) 
>           id OAA32590; Fri, 23 Aug 1996 14:06:43 -0500
> Date: Fri, 23 Aug 1996 14:06:43 -0500
> Message-Id: <199608231906.OAA32590@pembroke.ctd.anl.gov>
> From: Doug Engert <DEEngert@anl.gov>
> To: Glenn Machin <gmachin@sahp044.sandia.gov>
> Cc: authtf@es.net, rdetry@sandia.gov
> Subject: KRB5B6 on HPUX 9.05
> In-Reply-To: <199608221829.MAA10630@sass165.sandia.gov>
> References: <199608221829.MAA10630@sass165.sandia.gov>
> 
> Glenn Machin writes:
>  > 
>  > I'm sure someone from this group can identify the problem.
>  > 
>  > When I run any of the kerberos applications such as telnet
>  > or gssftp, I get a segmentation violation in the macro:
>  > krb5_calculate_checksum
>  > 
>  > We are using a DCE security server for the KDC and it
>  > appears to crash in the process of getting the service
>  > ticket.
>  > 
>  > I have set the following variables in /etc/krb5.conf
>  > 
>  > ccache_type = 2
>  > kdc_req_checksum_type = 2
>  > 
>  > 
>  > The code works fine on a sparc 20 solaris 2.5, but is
>  > crashing under HP.   Any ideas?
>  > 
>  > Glenn
>  > 
> I tried the K5b6 FTP and telnet on HP UX 10 and HP UX 9.0 to an AIX
> 4.1.4 system, and they appear to work. 
> 
> The security server is a HP UX 10.10 running DCE 1.1 (HP 1.4?)
> 
> I compiled with gcc. 
>  
> This may sound dumb, but double check the krb5.conf file to make sure
> there are no extra characters after the "2". I had a problem once with
> the kdc = xxx:88 and it did not parse it correctly. 
> 
> Do you have any other info from the dump, such as the ctype? Since the
> macro is: 
> 
> #define krb5_calculate_checksum(context, ctype, in, in_length, seed,
> seed_length,outcksum) krb5_x(((*krb5_cksumarray[ctype]->sum_func)),
> (in, in_length,seed,seed_length, outcksum)) 
> 
> if the ctype is wrong, it could cause a segmentation fault. 
> 
> -- 
>  
>  Douglas E. Engert  <DEEngert@anl.gov>
>  Argonne National Laboratory
>  9700 South Cass Avenue
>  Argonne, Illinois  60439 
>  (630) 252-5444          <New Area Code 8/3/96>
>  PGP Key fingerprint =  20 2B 0C 78 43 8A 9C A6  29 F7 A3 6D 5E 30 A6 7F
> 
> ----- End of forwarded messages
> 


--
    Sandia National Laboratories   |    Glenn Machin
    Dept. 4621, MS 0806            |    Email: gmachin@sandia.gov
    P.O. Box 5800                  |    Phone: (505) 844-8828
    Albuquerque, NM 87185-0806     |    Fax:   (505) 844-2067

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