Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

filesystem: Add labeling for pidfs. #762

Draft
wants to merge 2 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions policy/modules/kernel/filesystem.te
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fs_use_xattr zfs gen_context(system_u:object_r:fs_t,s0);
# like pipes and sockets, so that these objects are labeled with the same
# type as the creating task.
fs_use_task eventpollfs gen_context(system_u:object_r:fs_t,s0);
fs_use_task pidfs gen_context(system_u:object_r:fs_t,s0);
fs_use_task pipefs gen_context(system_u:object_r:fs_t,s0);
fs_use_task sockfs gen_context(system_u:object_r:fs_t,s0);

Expand Down
11 changes: 11 additions & 0 deletions policy/support/ipc_patterns.spt
Original file line number Diff line number Diff line change
Expand Up @@ -18,3 +18,14 @@ define(`dgram_send_pattern',`
allow $1 $3:sock_file write_sock_file_perms;
allow $1 $4:unix_dgram_socket sendto;
')

#
# pidfd
#
# Parameters:
# 1. source domain type
# 2. target domain type
define(`use_pidfds_pattern',`
allow $1 $2:fd use;
allow $1 $2:file { getattr read write };
')
Loading