krb5: Introduce KRB5_TKT_LIFETIME_DEFAULT
Instead of hard coding 10 hours as the default ticket lifetime within lib/krb5/init_cred_pw.c init_cred(), add a preprocessor macro, KRB5_TKT_LIFETIME_DEFAULT, that can be overridden at build time. The value of KRB5_TKT_LIFETIME_DEFAULT is 10 hours if not previously defined. Change-Id: I63e729fedee8e8c6f542e4a4665de5f40db34c03
This commit is contained in:
		| @@ -246,7 +246,7 @@ init_cred (krb5_context context, | ||||
|     if (options->flags & KRB5_GET_INIT_CREDS_OPT_TKT_LIFE) | ||||
| 	tmp = options->tkt_life; | ||||
|     else | ||||
| 	tmp = 10 * 60 * 60; | ||||
| 	tmp = KRB5_TKT_LIFETIME_DEFAULT; | ||||
|     cred->times.endtime = now + tmp; | ||||
|  | ||||
|     if ((options->flags & KRB5_GET_INIT_CREDS_OPT_RENEW_LIFE) && | ||||
|   | ||||
| @@ -356,6 +356,10 @@ typedef struct krb5_context_data { | ||||
| #define KRB5_FALLBACK_DEFAULT TRUE | ||||
| #endif | ||||
|  | ||||
| #ifndef KRB5_TKT_LIFETIME_DEFAULT | ||||
| # define KRB5_TKT_LIFETIME_DEFAULT	(10 * 60 * 60)	/* 10 hours */ | ||||
| #endif | ||||
|  | ||||
| #ifdef PKINIT | ||||
|  | ||||
| struct krb5_pk_identity { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Jeffrey Altman
					Jeffrey Altman