No subject


Tue Dec 13 08:59:42 EST 2011


> od -c /var/dss/kerberos/tkt/tkt_3e0c7aa506fd5b
0000000    j   o   h   n  \0  \0   k   r   b   t   g   t  \0   I   A   S
0000020    T   A   T   E   .   E   D   U  \0   I   A   S   T   A   T   E
0000040    .   E   D   U  \0 343   s   a   v   k 026 016 253   x  \0  \0
0000060   \0 002  \0  \0  \0   8  \0  \0  \0   l   ,   / 343 304       0
0000100  303 245 245 201 220   z 360 274   < 237   ; 312 273   {  \n 263
0000120    &   M 002 005   ) 225 216   Y 263 363 335 217 327 326 351 031
0000140  237 352 210 022 005 262 250 230 332 022 321   Y   . 202 374   ^
0000160  027   l   x  \f   >  \0  \0  \0  \0   a   c   c   t   s   r   v
                              ^^^^^^^^^^^^^^   \___start of 2nd ticket
                              \____here____/

this seems to be because of the way that krb_save_credentials() and
tf_save_cred() are declared, for example:

KRB5_DLLIMP int KRB5_CALLCONV krb_save_credentials
        PROTOTYPE((char FAR *service, char FAR *instance, char FAR *realm,
                   C_Block session, int lifetime, int kvno,
                   KTEXT ticket, long issue_date));
                                 ^^^^
                                 (8 bytes on this machine!)

I noted that CREDENTIALS.issue_date is defined as a KRB4_32 type,
so if I change them both like this:

KRB5_DLLIMP int KRB5_CALLCONV krb_save_credentials
        PROTOTYPE((char FAR *service, char FAR *instance, char FAR *realm,
                   C_Block session, int lifetime, int kvno,
                   KTEXT ticket, KRB4_32 issue_date));
                                 ^^^^^^^
                                 (4 bytes everywhere)

and change the end of tf_save_cred() from this:

   if (write(fd, (char *) &issue_date, sizeof(long))
        != sizeof(long))

to this:

   if (write(fd, (char *) &issue_date, sizeof(issue_date))
        != sizeof(issue_date))

and recompile, then everything seems to work together properly.
Is this correct?



John




More information about the krbdev mailing list