|
Chris PeBenito |
9105f9 |
## <summary>Policy for Mozilla and related web browsers</summary>
|
|
Chris PeBenito |
9105f9 |
|
|
Chris PeBenito |
296273 |
########################################
|
|
Chris PeBenito |
9105f9 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role access for mozilla
|
|
Chris PeBenito |
9105f9 |
## </summary>
|
|
Chris PeBenito |
296273 |
## <param name="role">
|
|
Chris PeBenito |
9105f9 |
## <summary>
|
|
Chris PeBenito |
296273 |
## Role allowed access
|
|
Chris PeBenito |
9105f9 |
## </summary>
|
|
Chris PeBenito |
9105f9 |
## </param>
|
|
Chris PeBenito |
296273 |
## <param name="domain">
|
|
Chris PeBenito |
9105f9 |
## <summary>
|
|
Chris PeBenito |
296273 |
## User domain for the role
|
|
Chris PeBenito |
9105f9 |
## </summary>
|
|
Chris PeBenito |
9105f9 |
## </param>
|
|
Chris PeBenito |
9105f9 |
#
|
|
Chris PeBenito |
296273 |
interface(`mozilla_role',`
|
|
Chris PeBenito |
563e58 |
gen_require(`
|
|
Chris PeBenito |
296273 |
type mozilla_t, mozilla_exec_t, mozilla_home_t;
|
|
Chris PeBenito |
563e58 |
')
|
|
Chris PeBenito |
563e58 |
|
|
Chris PeBenito |
296273 |
role $1 types mozilla_t;
|
|
Chris PeBenito |
9105f9 |
|
|
Chris PeBenito |
296273 |
domain_auto_trans($2, mozilla_exec_t, mozilla_t)
|
|
Chris PeBenito |
56e1b3 |
# Unrestricted inheritance from the caller.
|
|
Chris PeBenito |
296273 |
allow $2 mozilla_t:process { noatsecure siginh rlimitinh };
|
|
Chris PeBenito |
296273 |
allow mozilla_t $2:fd use;
|
|
Chris PeBenito |
296273 |
allow mozilla_t $2:process { sigchld signull };
|
|
Chris PeBenito |
296273 |
allow mozilla_t $2:unix_stream_socket connectto;
|
|
Chris PeBenito |
56e1b3 |
|
|
Chris PeBenito |
9105f9 |
# Allow the user domain to signal/ps.
|
|
Chris PeBenito |
296273 |
ps_process_pattern($2, mozilla_t)
|
|
Chris PeBenito |
296273 |
allow $2 mozilla_t:process signal_perms;
|
|
Chris PeBenito |
9105f9 |
|
|
Chris PeBenito |
296273 |
allow $2 mozilla_t:fd use;
|
|
Chris PeBenito |
296273 |
allow $2 mozilla_t:shm { associate getattr };
|
|
Chris PeBenito |
296273 |
allow $2 mozilla_t:shm { unix_read unix_write };
|
|
Chris PeBenito |
296273 |
allow $2 mozilla_t:unix_stream_socket connectto;
|
|
Chris PeBenito |
9105f9 |
|
|
Chris PeBenito |
296273 |
# X access, Home files
|
|
Chris PeBenito |
296273 |
manage_dirs_pattern($2, mozilla_home_t, mozilla_home_t)
|
|
Chris PeBenito |
296273 |
manage_files_pattern($2, mozilla_home_t, mozilla_home_t)
|
|
Chris PeBenito |
296273 |
manage_lnk_files_pattern($2, mozilla_home_t, mozilla_home_t)
|
|
Chris PeBenito |
296273 |
relabel_dirs_pattern($2, mozilla_home_t, mozilla_home_t)
|
|
Chris PeBenito |
296273 |
relabel_files_pattern($2, mozilla_home_t, mozilla_home_t)
|
|
Chris PeBenito |
296273 |
relabel_lnk_files_pattern($2, mozilla_home_t, mozilla_home_t)
|
|
Chris PeBenito |
9105f9 |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
296273 |
## Read mozilla home directory content
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
296273 |
interface(`mozilla_read_user_home_files',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
296273 |
type mozilla_home_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
296273 |
allow $1 mozilla_home_t:dir list_dir_perms;
|
|
Chris PeBenito |
296273 |
allow $1 mozilla_home_t:file read_file_perms;
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs($1)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
296273 |
## Write mozilla home directory content
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
296273 |
interface(`mozilla_write_user_home_files',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
296273 |
type mozilla_home_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
06625d |
write_files_pattern($1, mozilla_home_t, mozilla_home_t)
|
|
Chris PeBenito |
296273 |
userdom_search_user_home_dirs($1)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
296273 |
## Run mozilla in the mozilla domain.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
296273 |
interface(`mozilla_domtrans',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
296273 |
type mozilla_t, mozilla_exec_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
296273 |
domtrans_pattern($1, mozilla_exec_t, mozilla_t)
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Send and receive messages from
|
|
Chris PeBenito |
6b19be |
## mozilla over dbus.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
296273 |
interface(`mozilla_dbus_chat',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
296273 |
type mozilla_t;
|
|
Chris PeBenito |
6b19be |
class dbus send_msg;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
296273 |
allow $1 mozilla_t:dbus send_msg;
|
|
Chris PeBenito |
296273 |
allow mozilla_t $1:dbus send_msg;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
6b19be |
########################################
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## read/write mozilla per user tcp_socket
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## <param name="domain">
|
|
Chris PeBenito |
6b19be |
## <summary>
|
|
Chris PeBenito |
6b19be |
## Domain allowed access.
|
|
Chris PeBenito |
6b19be |
## </summary>
|
|
Chris PeBenito |
6b19be |
## </param>
|
|
Chris PeBenito |
6b19be |
#
|
|
Chris PeBenito |
296273 |
interface(`mozilla_rw_tcp_sockets',`
|
|
Chris PeBenito |
6b19be |
gen_require(`
|
|
Chris PeBenito |
296273 |
type mozilla_t;
|
|
Chris PeBenito |
6b19be |
')
|
|
Chris PeBenito |
6b19be |
|
|
Chris PeBenito |
296273 |
allow $1 mozilla_t:tcp_socket rw_socket_perms;
|
|
Chris PeBenito |
6b19be |
')
|