Blame view
include/linux/ima.h
1.95 KB
6146f0d5e
|
1 2 3 4 5 6 7 8 |
/* * Copyright (C) 2008 IBM Corporation * Author: Mimi Zohar <zohar@us.ibm.com> * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, version 2 of the License. */ |
6146f0d5e
|
9 10 |
#ifndef _LINUX_IMA_H #define _LINUX_IMA_H |
ed850a52a
|
11 12 |
#include <linux/fs.h> struct linux_binprm; |
3323eec92
|
13 14 |
#ifdef CONFIG_IMA extern int ima_bprm_check(struct linux_binprm *bprm); |
3034a1468
|
15 |
extern int ima_file_check(struct file *file, int mask, int opened); |
3323eec92
|
16 17 |
extern void ima_file_free(struct file *file); extern int ima_file_mmap(struct file *file, unsigned long prot); |
fdf90729e
|
18 |
extern int ima_module_check(struct file *file); |
5a9196d71
|
19 |
extern int ima_fw_from_file(struct file *file, char *buf, size_t size); |
3323eec92
|
20 21 |
#else |
6146f0d5e
|
22 23 24 25 |
static inline int ima_bprm_check(struct linux_binprm *bprm) { return 0; } |
3034a1468
|
26 |
static inline int ima_file_check(struct file *file, int mask, int opened) |
6146f0d5e
|
27 28 29 30 31 32 33 34 35 36 37 38 39 |
{ return 0; } static inline void ima_file_free(struct file *file) { return; } static inline int ima_file_mmap(struct file *file, unsigned long prot) { return 0; } |
9957a5043
|
40 |
|
fdf90729e
|
41 42 43 44 |
static inline int ima_module_check(struct file *file) { return 0; } |
5a9196d71
|
45 46 47 48 |
static inline int ima_fw_from_file(struct file *file, char *buf, size_t size) { return 0; } |
e05a4f4fc
|
49 |
#endif /* CONFIG_IMA */ |
9957a5043
|
50 51 52 |
#ifdef CONFIG_IMA_APPRAISE extern void ima_inode_post_setattr(struct dentry *dentry); |
42c63330f
|
53 54 55 |
extern int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name, const void *xattr_value, size_t xattr_value_len); extern int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name); |
9957a5043
|
56 57 58 59 60 |
#else static inline void ima_inode_post_setattr(struct dentry *dentry) { return; } |
42c63330f
|
61 62 63 64 65 66 67 68 69 70 71 72 73 74 |
static inline int ima_inode_setxattr(struct dentry *dentry, const char *xattr_name, const void *xattr_value, size_t xattr_value_len) { return 0; } static inline int ima_inode_removexattr(struct dentry *dentry, const char *xattr_name) { return 0; } |
e05a4f4fc
|
75 |
#endif /* CONFIG_IMA_APPRAISE */ |
6146f0d5e
|
76 |
#endif /* _LINUX_IMA_H */ |