integrity.h 1.02 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14
/*
 * Copyright (C) 2009 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.
 */

#ifndef _LINUX_INTEGRITY_H
#define _LINUX_INTEGRITY_H

#include <linux/fs.h>

Mimi Zohar's avatar
Mimi Zohar committed
15 16 17 18
enum integrity_status {
	INTEGRITY_PASS = 0,
	INTEGRITY_FAIL,
	INTEGRITY_NOLABEL,
19
	INTEGRITY_NOXATTRS,
Mimi Zohar's avatar
Mimi Zohar committed
20 21 22
	INTEGRITY_UNKNOWN,
};

23
/* List of EVM protected security xattrs */
24
#ifdef CONFIG_INTEGRITY
25
extern struct integrity_iint_cache *integrity_inode_get(struct inode *inode);
26
extern void integrity_inode_free(struct inode *inode);
27
extern void __init integrity_load_keys(void);
28 29

#else
30 31
static inline struct integrity_iint_cache *
				integrity_inode_get(struct inode *inode)
32
{
33
	return NULL;
34 35 36 37 38 39
}

static inline void integrity_inode_free(struct inode *inode)
{
	return;
}
40 41 42 43

static inline void integrity_load_keys(void)
{
}
44
#endif /* CONFIG_INTEGRITY */
45

46
#endif /* _LINUX_INTEGRITY_H */