diff options
author | Mickaël Salaün <[email protected]> | 2024-03-07 10:52:03 +0100 |
---|---|---|
committer | Mickaël Salaün <[email protected]> | 2024-03-08 18:22:16 +0100 |
commit | 63817febd1f3c27f633b2bce0d6db328e59fd019 (patch) | |
tree | 05816bfa23a1d370fbaf2b72951cf0a50d36fbbc /tools/perf/scripts/python/export-to-postgresql.py | |
parent | e3e37fe022a486d83c71eacb59fb5b6b0ebdbf78 (diff) |
landlock: Use f_cred in security_file_open() hook
Use landlock_cred(file->f_cred)->domain instead of
landlock_get_current_domain() in security_file_open() hook
implementation.
This should not change the current behavior but could avoid potential
race conditions in case of current task's credentials change.
This will also ensure consistency with upcoming audit support relying on
file->f_cred.
Add and use a new get_fs_domain() helper to mask non-filesystem domains.
file->f_cred is set by path_openat()/alloc_empty_file()/init_file() just
before calling security_file_alloc().
Cc: Christian Brauner <[email protected]>
Cc: Günther Noack <[email protected]>
Cc: Jann Horn <[email protected]>
Cc: Paul Moore <[email protected]>
Reviewed-by: Kees Cook <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Mickaël Salaün <[email protected]>
Diffstat (limited to 'tools/perf/scripts/python/export-to-postgresql.py')
0 files changed, 0 insertions, 0 deletions