]> git.proxmox.com Git - mirror_ubuntu-focal-kernel.git/blobdiff - security/integrity/integrity.h
ima: provide hash algo info in the xattr
[mirror_ubuntu-focal-kernel.git] / security / integrity / integrity.h
index 5429ca59125b0ed5c53ef669cfc24f934552caea..2fb5e53e927f2bf5432a34af1251c89f359d90f7 100644 (file)
@@ -54,6 +54,7 @@ enum evm_ima_xattr_type {
        IMA_XATTR_DIGEST = 0x01,
        EVM_XATTR_HMAC,
        EVM_IMA_XATTR_DIGSIG,
+       IMA_XATTR_DIGEST_NG,
 };
 
 struct evm_ima_xattr_data {
@@ -66,7 +67,17 @@ struct evm_ima_xattr_data {
 struct ima_digest_data {
        u8 algo;
        u8 length;
-       u8 type;
+       union {
+               struct {
+                       u8 unused;
+                       u8 type;
+               } sha1;
+               struct {
+                       u8 type;
+                       u8 algo;
+               } ng;
+               u8 data[2];
+       } xattr;
        u8 digest[0];
 } __packed;