add _krb5_krb_life_to_time
git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@11832 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
@@ -79,6 +79,26 @@ _krb5_krb_time_to_life(time_t start, time_t end)
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
time_t
|
||||||
|
_krb5_krb_life_to_time(int start, int life_)
|
||||||
|
{
|
||||||
|
unsigned char life = (unsigned char) life_;
|
||||||
|
|
||||||
|
#if 0
|
||||||
|
if (krb_no_long_lifetimes)
|
||||||
|
return start + life*5*60;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (life == TKTLIFENOEXPIRE)
|
||||||
|
return NEVERDATE;
|
||||||
|
if (life < TKTLIFEMINFIXED)
|
||||||
|
return start + life*5*60;
|
||||||
|
if (life > TKTLIFEMAXFIXED)
|
||||||
|
return start + MAXTKTLIFETIME;
|
||||||
|
return start + _tkt_lifetimes[life - TKTLIFEMINFIXED];
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/* Convert the v5 credentials in `in_cred' to v4-dito in `v4creds'.
|
/* Convert the v5 credentials in `in_cred' to v4-dito in `v4creds'.
|
||||||
* This is done by sending them to the 524 function in the KDC. If
|
* This is done by sending them to the 524 function in the KDC. If
|
||||||
* `in_cred' doesn't contain a DES session key, then a new one is
|
* `in_cred' doesn't contain a DES session key, then a new one is
|
||||||
|
@@ -84,6 +84,10 @@ struct credentials {
|
|||||||
int
|
int
|
||||||
_krb5_krb_time_to_life(time_t start, time_t end);
|
_krb5_krb_time_to_life(time_t start, time_t end);
|
||||||
|
|
||||||
|
time_t
|
||||||
|
_krb5_krb_life_to_time(int start, int life_);
|
||||||
|
|
||||||
#define krb_time_to_life _krb5_krb_time_to_life
|
#define krb_time_to_life _krb5_krb_time_to_life
|
||||||
|
#define krb_life_to_time _krb5_krb_life_to_time
|
||||||
|
|
||||||
#endif /* __KRB5_V4COMPAT_H__ */
|
#endif /* __KRB5_V4COMPAT_H__ */
|
||||||
|
Reference in New Issue
Block a user