summaryrefslogtreecommitdiffstats
path: root/security/commoncap.c
diff options
context:
space:
mode:
authorRichard Guy Briggs <rgb@redhat.com>2019-01-24 03:36:25 +0100
committerPaul Moore <paul@paul-moore.com>2019-01-25 19:31:23 +0100
commit2fec30e245a3b46fef89c4cb1f74eefc5fbb29a6 (patch)
tree30f896171576cf88bf31c1cdd6c26140ab1ab47f /security/commoncap.c
parentaudit: move loginuid and sessionid from CONFIG_AUDITSYSCALL to CONFIG_AUDIT (diff)
downloadlinux-2fec30e245a3b46fef89c4cb1f74eefc5fbb29a6.tar.xz
linux-2fec30e245a3b46fef89c4cb1f74eefc5fbb29a6.zip
audit: add support for fcaps v3
V3 namespaced file capabilities were introduced in commit 8db6c34f1dbc ("Introduce v3 namespaced file capabilities") Add support for these by adding the "frootid" field to the existing fcaps fields in the NAME and BPRM_FCAPS records. Please see github issue https://github.com/linux-audit/audit-kernel/issues/103 Signed-off-by: Richard Guy Briggs <rgb@redhat.com> Acked-by: Serge Hallyn <serge@hallyn.com> [PM: comment tweak to fit an 80 char line width] Signed-off-by: Paul Moore <paul@paul-moore.com>
Diffstat (limited to 'security/commoncap.c')
-rw-r--r--security/commoncap.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/security/commoncap.c b/security/commoncap.c
index 232db019f051..c097f3568001 100644
--- a/security/commoncap.c
+++ b/security/commoncap.c
@@ -643,6 +643,8 @@ int get_vfs_caps_from_disk(const struct dentry *dentry, struct cpu_vfs_cap_data
cpu_caps->permitted.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK;
cpu_caps->inheritable.cap[CAP_LAST_U32] &= CAP_LAST_U32_VALID_MASK;
+ cpu_caps->rootid = rootkuid;
+
return 0;
}