(kadm5_s_get_principal): set life, rlife to INT_MAX as a fallback.
handle not having any creator. git-svn-id: svn://svn.h5l.se/heimdal/trunk/heimdal@8214 ec53bebd-3082-4978-b11e-865c3cabbd6b
This commit is contained in:
		| @@ -78,8 +78,12 @@ kadm5_s_get_principal(void *server_handle, | ||||
| 	out->attributes |= ent.flags.server ? 0 : KRB5_KDB_DISALLOW_SVR; | ||||
| 	out->attributes |= ent.flags.change_pw ? KRB5_KDB_PWCHANGE_SERVICE : 0; | ||||
|     } | ||||
|     if(mask & KADM5_MAX_LIFE && ent.max_life) | ||||
| 	out->max_life = *ent.max_life; | ||||
|     if(mask & KADM5_MAX_LIFE) { | ||||
| 	if(ent.max_life) | ||||
| 	    out->max_life = *ent.max_life; | ||||
| 	else | ||||
| 	    out->max_life = INT_MAX; | ||||
|     } | ||||
|     if(mask & KADM5_MOD_TIME) { | ||||
| 	if(ent.modified_by) | ||||
| 	    out->mod_date = ent.modified_by->time; | ||||
| @@ -92,10 +96,12 @@ kadm5_s_get_principal(void *server_handle, | ||||
| 		ret = krb5_copy_principal(context->context,  | ||||
| 					  ent.modified_by->principal, | ||||
| 					  &out->mod_name); | ||||
| 	} else | ||||
| 	} else if(ent.created_by.principal != NULL) | ||||
| 	    ret = krb5_copy_principal(context->context,  | ||||
| 				      ent.created_by.principal, | ||||
| 				      &out->mod_name); | ||||
| 	else | ||||
| 	    out->mod_name = NULL; | ||||
|     } | ||||
|     if(ret) | ||||
| 	goto out; | ||||
| @@ -115,8 +121,12 @@ kadm5_s_get_principal(void *server_handle, | ||||
| 	/* XXX implement */; | ||||
|     if(mask & KADM5_POLICY) | ||||
| 	out->policy = NULL; | ||||
|     if(mask & KADM5_MAX_RLIFE && ent.max_renew) | ||||
| 	out->max_renewable_life = *ent.max_renew; | ||||
|     if(mask & KADM5_MAX_RLIFE) { | ||||
| 	if(ent.max_renew) | ||||
| 	    out->max_renewable_life = *ent.max_renew; | ||||
| 	else | ||||
| 	    out->max_renewable_life = INT_MAX; | ||||
|     } | ||||
|     if(mask & KADM5_LAST_SUCCESS) | ||||
| 	/* XXX implement */; | ||||
|     if(mask & KADM5_LAST_FAILED) | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 Assar Westerlund
					Assar Westerlund