Skip to content

Commit

Permalink
Add label for brltty log file Resolves: rhbz#1328818
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Sekidde authored and wrabcak committed Jun 28, 2016
1 parent 1088ec9 commit e7f6872
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
2 changes: 2 additions & 0 deletions brltty.fc
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
/tmp/brltty\.log.* -- gen_context(system_u:object_r:brltty_log_t,s0)

/usr/lib/systemd/system/brltty.* -- gen_context(system_u:object_r:brltty_unit_file_t,s0)

/usr/bin/brltty -- gen_context(system_u:object_r:brltty_exec_t,s0)
Expand Down
8 changes: 8 additions & 0 deletions brltty.te
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ files_type(brltty_var_lib_t)
type brltty_var_run_t;
files_pid_file(brltty_var_run_t)

type brltty_log_t;
logging_log_file(brltty_log_t)

type brltty_unit_file_t;
systemd_unit_file(brltty_unit_file_t)

Expand All @@ -29,6 +32,11 @@ allow brltty_t self:fifo_file rw_fifo_file_perms;
allow brltty_t self:unix_stream_socket create_stream_socket_perms;
allow brltty_t self:tcp_socket listen;

manage_files_pattern(brltty_t, brltty_log_t, brltty_log_t)
manage_sock_files_pattern(brltty_t, brltty_log_t, brltty_log_t)
manage_lnk_files_pattern(brltty_t, brltty_log_t, brltty_log_t)
logging_log_filetrans(brltty_t, brltty_log_t, { sock_file file dir })

manage_dirs_pattern(brltty_t, brltty_var_lib_t, brltty_var_lib_t)
manage_files_pattern(brltty_t, brltty_var_lib_t, brltty_var_lib_t)
manage_sock_files_pattern(brltty_t,brltty_var_lib_t, brltty_var_lib_t)
Expand Down

0 comments on commit e7f6872

Please sign in to comment.