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

Adding SE Policy rules to allow usage of unix stream sockets by dbus … #804

Merged
Merged
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
22 changes: 22 additions & 0 deletions policy/modules/services/bluetooth.if
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,28 @@ interface(`bluetooth_dontaudit_read_helper_state',`
dontaudit $1 bluetooth_helper_t:file read_file_perms;
')

#####################################
## <summary>
## Connect to bluetooth over a unix domain
## stream socket. The socket can be used
## for read and write. This is required for
# bluetooth helper context.
## </summary>
## <param name="domain">
## <summary>
## Domain allowed access.
## </summary>
## </param>
#
interface(`bluetooth_use_inherited_helper_stream_sockets',`
gen_require(`
type bluetooth_helper_t;
')

allow $1 bluetooth_helper_t:unix_stream_socket rw_socket_perms;
allow $1 bluetooth_helper_t:fd use;
')

########################################
## <summary>
## All of the rules required to
Expand Down
2 changes: 2 additions & 0 deletions policy/modules/services/bluetooth.te
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ files_runtime_filetrans(bluetooth_t, bluetooth_runtime_t, { file sock_file })

can_exec(bluetooth_t, bluetooth_helper_exec_t)

bluetooth_use_inherited_helper_stream_sockets(bluetooth_t)

kernel_read_kernel_sysctls(bluetooth_t)
kernel_read_system_state(bluetooth_t)
kernel_read_network_state(bluetooth_t)
Expand Down
1 change: 1 addition & 0 deletions policy/modules/services/dbus.te
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,7 @@ optional_policy(`

optional_policy(`
bluetooth_use(system_dbusd_t)
bluetooth_use_inherited_helper_stream_sockets(system_dbusd_t)
')

optional_policy(`
Expand Down