Skip to content

Commit eb74509

Browse files
authored
Merge pull request #1076 from pebenito/bluetooth-notify-damodar.gangireddy
sepolicy: Add sepolicy rules for bluetooth Notify failures
2 parents ba5c913 + ff5bd4b commit eb74509

3 files changed

Lines changed: 26 additions & 0 deletions

File tree

policy/modules/services/bluetooth.te

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,12 @@ optional_policy(`
157157
optional_policy(`
158158
systemd_dbus_chat_hostnamed(bluetooth_t)
159159
')
160+
161+
optional_policy(`
162+
unconfined_use_fds(bluetooth_t)
163+
unconfined_rw_stream_sockets(bluetooth_t)
164+
')
165+
160166
')
161167

162168
optional_policy(`
@@ -177,6 +183,7 @@ allow bluetooth_helper_t self:process getsched;
177183
allow bluetooth_helper_t self:fifo_file rw_fifo_file_perms;
178184
allow bluetooth_helper_t self:shm create_shm_perms;
179185
allow bluetooth_helper_t self:unix_stream_socket { accept connectto listen };
186+
allow bluetooth_helper_t self:bluetooth_socket create_socket_perms;
180187

181188
allow bluetooth_helper_t bluetooth_t:socket { read write };
182189
allow bluetooth_helper_t bluetooth_t:fd use;

policy/modules/services/dbus.te

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ optional_policy(`
310310
optional_policy(`
311311
unconfined_dbus_send(system_dbusd_t)
312312
unconfined_use_fds(system_dbusd_t)
313+
unconfined_rw_stream_sockets(system_dbusd_t)
313314
')
314315

315316
optional_policy(`

policy/modules/system/unconfined.if

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,24 @@ interface(`unconfined_stream_connect',`
489489
allow $1 unconfined_t:unix_stream_socket connectto;
490490
')
491491

492+
########################################
493+
## <summary>
494+
## Allow a domain to read and write
495+
## to unconfined unix stream sockets.
496+
## </summary>
497+
## <param name="domain">
498+
## <summary>
499+
## Domain to grant permission to.
500+
## </summary>
501+
## </param>
502+
#
503+
interface(`unconfined_rw_stream_sockets',`
504+
gen_require(`
505+
type unconfined_t;
506+
')
507+
allow $1 unconfined_t:unix_stream_socket rw_socket_perms;
508+
')
509+
492510
########################################
493511
## <summary>
494512
## Do not audit attempts to read and write

0 commit comments

Comments
 (0)