ima.h (4ba25a496f62129a2ad8c2436ab2b402752dc66c) | ima.h (c7c8bb237fdbff932b5e431aebee5ce862ea07d1) |
---|---|
1/* 2 * Copyright (C) 2005,2006,2007,2008 IBM Corporation 3 * 4 * Authors: 5 * Reiner Sailer <sailer@watson.ibm.com> 6 * Mimi Zohar <zohar@us.ibm.com> 7 * 8 * This program is free software; you can redistribute it and/or --- 25 unchanged lines hidden (view full) --- 34#define IMA_EVENT_NAME_LEN_MAX 255 35 36#define IMA_HASH_BITS 9 37#define IMA_MEASURE_HTABLE_SIZE (1 << IMA_HASH_BITS) 38 39/* set during initialization */ 40extern int ima_initialized; 41extern int ima_used_chip; | 1/* 2 * Copyright (C) 2005,2006,2007,2008 IBM Corporation 3 * 4 * Authors: 5 * Reiner Sailer <sailer@watson.ibm.com> 6 * Mimi Zohar <zohar@us.ibm.com> 7 * 8 * This program is free software; you can redistribute it and/or --- 25 unchanged lines hidden (view full) --- 34#define IMA_EVENT_NAME_LEN_MAX 255 35 36#define IMA_HASH_BITS 9 37#define IMA_MEASURE_HTABLE_SIZE (1 << IMA_HASH_BITS) 38 39/* set during initialization */ 40extern int ima_initialized; 41extern int ima_used_chip; |
42extern char *ima_hash; | 42extern int ima_hash_algo; |
43extern int ima_appraise; 44 45/* IMA inode template definition */ 46struct ima_template_data { 47 u8 digest[IMA_DIGEST_SIZE]; /* sha1/md5 measurement hash */ 48 char file_name[IMA_EVENT_NAME_LEN_MAX + 1]; /* name + \0 */ 49}; 50 --- 14 unchanged lines hidden (view full) --- 65/* Internal IMA function definitions */ 66int ima_init(void); 67void ima_cleanup(void); 68int ima_fs_init(void); 69void ima_fs_cleanup(void); 70int ima_inode_alloc(struct inode *inode); 71int ima_add_template_entry(struct ima_template_entry *entry, int violation, 72 const char *op, struct inode *inode); | 43extern int ima_appraise; 44 45/* IMA inode template definition */ 46struct ima_template_data { 47 u8 digest[IMA_DIGEST_SIZE]; /* sha1/md5 measurement hash */ 48 char file_name[IMA_EVENT_NAME_LEN_MAX + 1]; /* name + \0 */ 49}; 50 --- 14 unchanged lines hidden (view full) --- 65/* Internal IMA function definitions */ 66int ima_init(void); 67void ima_cleanup(void); 68int ima_fs_init(void); 69void ima_fs_cleanup(void); 70int ima_inode_alloc(struct inode *inode); 71int ima_add_template_entry(struct ima_template_entry *entry, int violation, 72 const char *op, struct inode *inode); |
73int ima_calc_file_hash(struct file *file, char *digest); 74int ima_calc_buffer_hash(const void *data, int len, char *digest); | 73int ima_calc_file_hash(struct file *file, struct ima_digest_data *hash); 74int ima_calc_buffer_hash(const void *data, int len, 75 struct ima_digest_data *hash); |
75int ima_calc_boot_aggregate(char *digest); 76void ima_add_violation(struct inode *inode, const unsigned char *filename, 77 const char *op, const char *cause); 78int ima_init_crypto(void); 79 80/* 81 * used to protect h_table and sha_table 82 */ --- 106 unchanged lines hidden --- | 76int ima_calc_boot_aggregate(char *digest); 77void ima_add_violation(struct inode *inode, const unsigned char *filename, 78 const char *op, const char *cause); 79int ima_init_crypto(void); 80 81/* 82 * used to protect h_table and sha_table 83 */ --- 106 unchanged lines hidden --- |