[OpenAFS-devel] token cache behavior

James E. Flemer jflemer@acm.jhu.edu
Mon, 6 Aug 2001 19:49:39 -0400 (EDT)


  This message is in MIME format.  The first part should be readable text,
  while the remaining parts are likely unreadable without MIME-aware tools.
  Send mail to mime@docserver.cac.washington.edu for more info.

---595574305-99740850-997141779=:16523
Content-Type: TEXT/PLAIN; charset=US-ASCII

Platform: SunOS afs1 5.8 Generic_108528-08 sun4u sparc SUNW,Ultra-5_10
and     : AIX afs0 3 4 000BD91D4C00

I am trying to diagnose a problem using aklog and DCE...
(but the following problems are using niether ... just
vanilla openafs-1.1.0).

I wrote a more verbose version of 'tokens' to see what was
going on with the token cache. The verbose version (I call
'vtokens'), prints out the ticket in hex (plus lots more).

I was wondering if someone could explain the results...
Each time I run it, the ticket changes. However it seems to
change back and forth between two specific values.
Furthermore it seems that the ticket length is being set
incorrectly or something, because part of the ticket is
this:
 00 00 00 18 00 00 00 01 <sessionKey> ...
which looks a lot like the sizeof(struct ClearToken)
folowed by the ClearToken... but the last 4 bytes of the
ClearToken are missing.

This happens on AIX 4.3.3 and Solaris 8.
The attached 'vtokens.c' can be complied with:

cc -o vtokens -I/usr/afsws/include vtokens.c \
	/usr/afsws/lib/afs/libauth.a \
	/usr/afsws/lib/afs/libsys.a \
	/usr/afsws/lib/librx.a \
	/usr/afsws/lib/liblwp.a

-James

---595574305-99740850-997141779=:16523
Content-Type: TEXT/PLAIN; charset=US-ASCII; name="vtokens.c"
Content-Transfer-Encoding: BASE64
Content-ID: <Pine.LNX.4.33L2.0108061949390.16523@centaur.acm.jhu.edu>
Content-Description: 
Content-Disposition: attachment; filename="vtokens.c"

I2luY2x1ZGUgPHN0ZGlvLmg+DQojaW5jbHVkZSA8YWZzL3BhcmFtLmg+DQoj
aW5jbHVkZSA8YWZzL2Fmcy5oPg0KI2luY2x1ZGUgPGFmcy9hdXRoLmg+DQoN
CmludCBtYWluKGFyZ2MsIGFyZ3YpDQoJCWludCBhcmdjOw0KCQljaGFyICoq
YXJndjs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