Merge pull request #780 from pebenito/quic_nakella-gatt
Adding Sepolicy rules to allow bluetoothctl and dbus-daemon to access unix stream sockets.
This commit is contained in:
commit
50a1ee7e9c
@ -193,7 +193,7 @@ optional_policy(`
|
|||||||
')
|
')
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
bluetooth_stream_connect(pulseaudio_t)
|
bluetooth_use(pulseaudio_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
|
@ -85,6 +85,30 @@ interface(`bluetooth_stream_connect',`
|
|||||||
stream_connect_pattern($1, bluetooth_runtime_t, bluetooth_runtime_t, bluetooth_t)
|
stream_connect_pattern($1, bluetooth_runtime_t, bluetooth_runtime_t, bluetooth_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
|
#####################################
|
||||||
|
## <summary>
|
||||||
|
## Connect to bluetooth over a unix domain
|
||||||
|
## stream socket. The socket can be used
|
||||||
|
## for read and write.
|
||||||
|
## </summary>
|
||||||
|
## <param name="domain">
|
||||||
|
## <summary>
|
||||||
|
## Domain allowed access.
|
||||||
|
## </summary>
|
||||||
|
## </param>
|
||||||
|
#
|
||||||
|
interface(`bluetooth_use',`
|
||||||
|
gen_require(`
|
||||||
|
type bluetooth_t;
|
||||||
|
')
|
||||||
|
|
||||||
|
files_search_runtime($1)
|
||||||
|
allow $1 bluetooth_t:bluetooth_socket rw_socket_perms;
|
||||||
|
allow $1 bluetooth_t:unix_stream_socket rw_socket_perms;
|
||||||
|
allow $1 bluetooth_t:fd use;
|
||||||
|
bluetooth_stream_connect($1)
|
||||||
|
')
|
||||||
|
|
||||||
########################################
|
########################################
|
||||||
## <summary>
|
## <summary>
|
||||||
## Execute bluetooth in the bluetooth domain.
|
## Execute bluetooth in the bluetooth domain.
|
||||||
|
@ -265,7 +265,7 @@ optional_policy(`
|
|||||||
')
|
')
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
bluetooth_stream_connect(system_dbusd_t)
|
bluetooth_use(system_dbusd_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
|
@ -31,7 +31,7 @@ miscfiles_read_localization(obex_t)
|
|||||||
userdom_search_user_home_content(obex_t)
|
userdom_search_user_home_content(obex_t)
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
bluetooth_stream_connect(obex_t)
|
bluetooth_use(obex_t)
|
||||||
')
|
')
|
||||||
|
|
||||||
optional_policy(`
|
optional_policy(`
|
||||||
|
Loading…
Reference in New Issue
Block a user