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

Dbus fixes #743

Merged
merged 3 commits into from
Jan 3, 2024
Merged
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
17 changes: 16 additions & 1 deletion policy/modules/services/dbus.if
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,9 @@ template(`dbus_role_template',`
domain_entry_file($1_dbusd_t, dbusd_exec_t)
ubac_constrained($1_dbusd_t)

type $1_dbusd_tmpfs_t;
pebenito marked this conversation as resolved.
Show resolved Hide resolved
files_tmpfs_file($1_dbusd_tmpfs_t)

role $2 types $1_dbusd_t;

##############################
Expand All @@ -91,7 +94,7 @@ template(`dbus_role_template',`
dontaudit $1_dbusd_t self:cap_userns sys_ptrace;

allow $3 system_dbusd_t:dbus { send_msg acquire_svc };
dontaudit $3 $1_dbusd_t:netlink_selinux_socket { read write };
dontaudit $3 $1_dbusd_t:netlink_selinux_socket { read write };

allow $3 { session_dbusd_home_t session_dbusd_tmp_t }:dir { manage_dir_perms relabel_dir_perms };
allow $3 { session_dbusd_home_t session_dbusd_tmp_t }:file { manage_file_perms relabel_file_perms };
Expand All @@ -105,17 +108,29 @@ template(`dbus_role_template',`

allow $1_dbusd_t $3:process sigkill;
allow $1_dbusd_t session_dbusd_tmp_t:sock_file manage_sock_file_perms;
allow $1_dbusd_t self:unix_stream_socket connectto;

allow $1_dbusd_t $1_dbusd_tmpfs_t:file mmap_rw_inherited_file_perms;

files_read_etc_runtime_files($1_dbusd_t)

fs_tmpfs_filetrans($1_dbusd_t, $1_dbusd_tmpfs_t, file)

kernel_getattr_proc($1_dbusd_t)

corecmd_bin_domtrans($1_dbusd_t, $3)
corecmd_shell_domtrans($1_dbusd_t, $3)

selinux_use_status_page($1_dbusd_t)

auth_use_nsswitch($1_dbusd_t)

dbus_exec($1_dbusd_t)

optional_policy(`
systemd_read_logind_runtime_files($1_dbusd_t)
systemd_user_daemon_domain($1, dbusd_exec_t, $1_dbusd_t)
systemd_user_send_systemd_notify($1, $1_dbusd_t)
systemd_user_unix_stream_activated_socket($1_dbusd_t, session_dbusd_runtime_t)
')
')
Expand Down
Loading