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

Label /run/user/.../bus as session_dbusd_tmp_t #196

Open
wants to merge 2 commits into
base: rawhide
Choose a base branch
from
Open
Changes from 1 commit
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
Prev Previous commit
Support /run/user/.../{bus,systemd} to be labeled session_dbusd_tmp_t
secureworkstation authored Feb 3, 2020

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
commit 0cccc0fe7851d011169a29ef9b48a36e7795c213
28 changes: 28 additions & 0 deletions dbus.if
Original file line number Diff line number Diff line change
@@ -112,6 +112,11 @@ template(`dbus_role_template',`
tunable_policy(`deny_ptrace',`',`
allow $3 $1_dbusd_t:process ptrace;
')

# session systemd
userdom_user_tmp_filetrans($3, session_dbusd_tmp_t, dir, "systemd")
userdom_user_tmp_filetrans($3, session_dbusd_tmp_t, sock_file, "bus")
allow $3 session_dbusd_tmp_t:sock_file { create unlink };

# cjp: this seems very broken
corecmd_bin_domtrans($1_dbusd_t, $1_t)
@@ -212,6 +217,7 @@ interface(`dbus_session_client',`
interface(`dbus_session_bus_client',`
gen_require(`
attribute session_bus_type;
type session_dbusd_tmp_t;
class dbus send_msg;
')

@@ -220,6 +226,8 @@ interface(`dbus_session_bus_client',`

# For connecting to the bus
allow $1 session_bus_type:unix_stream_socket connectto;

stream_connect_pattern($1, session_dbusd_tmp_t, session_dbusd_tmp_t, session_bus_type)

allow session_bus_type $1:process sigkill;
')
@@ -766,6 +774,26 @@ interface(`dbus_manage_session_tmp_dirs',`
manage_dirs_pattern($1, session_dbusd_tmp_t, session_dbusd_tmp_t)
')

########################################
## <summary>
## Manage session_dbusd tmp files.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`dbus_manage_session_tmp_files',`
gen_require(`
type session_dbusd_tmp_t;
')

manage_files_pattern($1, session_dbusd_tmp_t, session_dbusd_tmp_t)
allow $1 session_dbusd_tmp_t:sock_file unlink;
')


########################################
## <summary>
## Allow systemctl dbus services