API help with ticket expiry

Ken Hornstein kenh at cmf.nrl.navy.mil
Thu Sep 28 00:14:24 EDT 2006


>I have been able to create the ticket using encrypted username/password
>and am now working on making sure the ticket doesn't expire before the
>job ends.  Granted, this isn't the safest mechanism, but users don't
>want jobs to abort if ticket expires when they are not around.
>
>krb5_timeofday() will obtain what I need (seconds since epoch) for the
>current time-of-day.
>
How would one go about obtaining the seconds since epoch for the ticket
>expiration time-of-day?

Assuming you have a krb5_ticket structure around (actually, I suspect you
really have a krb5_creds structure, so lets use that), you can find
the expiration time in creds.times.endtime structure member.

--Ken



More information about the Kerberos mailing list