ima: define new function ima_alloc_init_template() to API