summaryrefslogtreecommitdiffstats
path: root/security/integrity/integrity.h
diff options
context:
space:
mode:
authorDmitry Kasatkin <dmitry.kasatkin@intel.com>2012-09-12 19:51:32 +0200
committerMimi Zohar <zohar@linux.vnet.ibm.com>2012-09-13 20:23:57 +0200
commit45e2472e67bf66f794d507b52e82af92e0614e49 (patch)
tree4b3ba557d4f9da9bca14ce85bee965e4a9fcd6ac /security/integrity/integrity.h
parentima: rename ima_must_appraise_or_measure (diff)
downloadlinux-45e2472e67bf66f794d507b52e82af92e0614e49.tar.xz
linux-45e2472e67bf66f794d507b52e82af92e0614e49.zip
ima: generic IMA action flag handling
Make the IMA action flag handling generic in order to support additional new actions, without requiring changes to the base implementation. New actions, like audit logging, will only need to modify the define statements. Signed-off-by: Dmitry Kasatkin <dmitry.kasatkin@intel.com> Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Diffstat (limited to 'security/integrity/integrity.h')
-rw-r--r--security/integrity/integrity.h18
1 files changed, 12 insertions, 6 deletions
diff --git a/security/integrity/integrity.h b/security/integrity/integrity.h
index 4eec1b14193e..564ba7db5f6a 100644
--- a/security/integrity/integrity.h
+++ b/security/integrity/integrity.h
@@ -15,13 +15,19 @@
#include <linux/integrity.h>
#include <crypto/sha.h>
+/* iint action cache flags */
+#define IMA_MEASURE 0x0001
+#define IMA_MEASURED 0x0002
+#define IMA_APPRAISE 0x0004
+#define IMA_APPRAISED 0x0008
+/*#define IMA_COLLECT 0x0010 do not use this flag */
+#define IMA_COLLECTED 0x0020
+
/* iint cache flags */
-#define IMA_MEASURE 0x01
-#define IMA_MEASURED 0x02
-#define IMA_APPRAISE 0x04
-#define IMA_APPRAISED 0x08
-#define IMA_COLLECTED 0x10
-#define IMA_DIGSIG 0x20
+#define IMA_DIGSIG 0x0100
+
+#define IMA_DO_MASK (IMA_MEASURE | IMA_APPRAISE)
+#define IMA_DONE_MASK (IMA_MEASURED | IMA_APPRAISED | IMA_COLLECTED)
enum evm_ima_xattr_type {
IMA_XATTR_DIGEST = 0x01,