• Thiago Jung Bauermann's avatar
    ima: Simplify policy_func_show. · 2663218b
    Thiago Jung Bauermann authored
    If the func_tokens array uses the same indices as enum ima_hooks,
    policy_func_show can be a lot simpler, and the func_* enum becomes
    unnecessary.
    
    Also, if we use the same macro trick used by kernel_read_file_id_str we can
    use one hooks list for both the enum and the string array, making sure they
    are always in sync (suggested by Mimi Zohar).
    
    Finally, by using the printf pattern for the function token directly
    instead of using the pt macro we can simplify policy_func_show even further
    and avoid needing a temporary buffer.
    Signed-off-by: default avatarThiago Jung Bauermann <bauerman@linux.vnet.ibm.com>
    Signed-off-by: default avatarMimi Zohar <zohar@linux.vnet.ibm.com>
    2663218b
ima.h 9.38 KB