mirror of
https://github.com/tbsdtv/linux_media.git
synced 2025-07-23 12:43:29 +02:00
audit: add support for fcaps v3
V3 namespaced file capabilities were introduced in
commit 8db6c34f1d
("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>
This commit is contained in:
committed by
Paul Moore
parent
4b7d248b3a
commit
2fec30e245
@@ -1358,6 +1358,9 @@ static void audit_log_exit(void)
|
||||
audit_log_cap(ab, "pi", &axs->new_pcap.inheritable);
|
||||
audit_log_cap(ab, "pe", &axs->new_pcap.effective);
|
||||
audit_log_cap(ab, "pa", &axs->new_pcap.ambient);
|
||||
audit_log_format(ab, " frootid=%d",
|
||||
from_kuid(&init_user_ns,
|
||||
axs->fcap.rootid));
|
||||
break; }
|
||||
|
||||
}
|
||||
@@ -2271,6 +2274,7 @@ int __audit_log_bprm_fcaps(struct linux_binprm *bprm,
|
||||
ax->fcap.permitted = vcaps.permitted;
|
||||
ax->fcap.inheritable = vcaps.inheritable;
|
||||
ax->fcap.fE = !!(vcaps.magic_etc & VFS_CAP_FLAGS_EFFECTIVE);
|
||||
ax->fcap.rootid = vcaps.rootid;
|
||||
ax->fcap_ver = (vcaps.magic_etc & VFS_CAP_REVISION_MASK) >> VFS_CAP_REVISION_SHIFT;
|
||||
|
||||
ax->old_pcap.permitted = old->cap_permitted;
|
||||
|
Reference in New Issue
Block a user