diff options
author | Roberto Sassu <roberto.sassu@huawei.com> | 2021-05-28 09:38:07 +0200 |
---|---|---|
committer | Mimi Zohar <zohar@linux.ibm.com> | 2021-06-01 21:17:30 +0200 |
commit | 7dcfeacc5a9d0c130160b86de23279793a8732c8 (patch) | |
tree | 13a5d74a73aa57480cb9cc947abdc2535be72681 /security/integrity/ima/ima_template.c | |
parent | ima: Add ima_show_template_uint() template library function (diff) | |
download | linux-7dcfeacc5a9d0c130160b86de23279793a8732c8.tar.xz linux-7dcfeacc5a9d0c130160b86de23279793a8732c8.zip |
ima: Define new template fields iuid and igid
This patch defines the new template fields iuid and igid, which include
respectively the inode UID and GID. For idmapped mounts, still the original
UID and GID are provided.
These fields can be used to verify the EVM portable signature, if it was
included with the template fields sig or evmsig.
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Acked-by: Christian Brauner <christian.brauner@ubuntu.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Diffstat (limited to 'security/integrity/ima/ima_template.c')
-rw-r--r-- | security/integrity/ima/ima_template.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/security/integrity/ima/ima_template.c b/security/integrity/ima/ima_template.c index 7a60848c04a5..a5ecd9e2581b 100644 --- a/security/integrity/ima/ima_template.c +++ b/security/integrity/ima/ima_template.c @@ -47,6 +47,10 @@ static const struct ima_template_field supported_fields[] = { .field_show = ima_show_template_sig}, {.field_id = "evmsig", .field_init = ima_eventevmsig_init, .field_show = ima_show_template_sig}, + {.field_id = "iuid", .field_init = ima_eventinodeuid_init, + .field_show = ima_show_template_uint}, + {.field_id = "igid", .field_init = ima_eventinodegid_init, + .field_show = ima_show_template_uint}, }; /* |