Skip to content

Commit fc06a69

Browse files
JJanasekzpytela
authored andcommitted
fix: bz2279215 Allow speech-dispatcher access to user home/cache files
Speech-dispatcherd fails with AVC denials when configured to run as an unprivileged user (User=testuser) for a user session, as it requires access to the user's homedirectory contexts for PID files, logs, sockets, and PulseAudio configuration. speech-dispatcher requires to work with cache and pulse-audio fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2279215 Signed-off-by: jan janasek <[email protected]>
1 parent 611f618 commit fc06a69

File tree

1 file changed

+18
-0
lines changed

1 file changed

+18
-0
lines changed

policy/modules/contrib/speech-dispatcher.te

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,7 @@ allow speech_dispatcher_t self:fifo_file rw_fifo_file_perms;
4343
allow speech_dispatcher_t self:unix_stream_socket create_stream_socket_perms;
4444
allow speech_dispatcher_t self:tcp_socket create_socket_perms;
4545

46+
4647
manage_dirs_pattern(speech_dispatcher_t, speech_dispatcher_log_t, speech_dispatcher_log_t)
4748
manage_files_pattern(speech_dispatcher_t, speech_dispatcher_log_t, speech_dispatcher_log_t)
4849
logging_log_filetrans(speech_dispatcher_t, speech_dispatcher_log_t, { dir })
@@ -52,6 +53,7 @@ files_tmp_filetrans(speech_dispatcher_t, speech_dispatcher_tmp_t, { file })
5253

5354
manage_files_pattern(speech_dispatcher_t, speech_dispatcher_tmpfs_t, speech_dispatcher_tmpfs_t)
5455
fs_tmpfs_filetrans(speech_dispatcher_t, speech_dispatcher_tmpfs_t, { file })
56+
allow speech_dispatcher_t speech_dispatcher_tmpfs_t:file map;
5557

5658
manage_files_pattern(speech_dispatcher_t, speech_dispatcher_home_t, speech_dispatcher_home_t)
5759
manage_dirs_pattern(speech_dispatcher_t, speech_dispatcher_home_t, speech_dispatcher_home_t)
@@ -66,3 +68,19 @@ corenet_tcp_connect_pdps_port(speech_dispatcher_t)
6668

6769
dev_read_urand(speech_dispatcher_t)
6870

71+
72+
files_manage_generic_tmp_dirs(speech_dispatcher_t)
73+
74+
libs_exec_lib_files(speech_dispatcher_t)
75+
76+
optional_policy(`
77+
gnome_create_home_config_dirs(speech_dispatcher_t)
78+
gnome_create_generic_cache_dir(speech_dispatcher_t)
79+
gnome_manage_generic_cache_files(speech_dispatcher_t)
80+
gnome_manage_generic_cache_sockets(speech_dispatcher_t)
81+
')
82+
83+
optional_policy(`
84+
pulseaudio_manage_home_dirs(speech_dispatcher_t)
85+
pulseaudio_manage_home_symlinks(speech_dispatcher_t)
86+
')

0 commit comments

Comments
 (0)