|
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 |
|
|
Dan Walsh |
3eaa99 |
mozilla_plugin_run(mozilla_t, $2)
|
|
Dan Walsh |
3eaa99 |
|
|
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 |
b77daa |
|
|
Chris PeBenito |
b77daa |
mozilla_dbus_chat($2)
|
|
Chris PeBenito |
b77daa |
|
|
Dan Walsh |
3eaa99 |
userdom_manage_tmp_role($1, mozilla_t)
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
optional_policy(`
|
|
Dan Walsh |
3eaa99 |
nsplugin_role($1, mozilla_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Chris PeBenito |
b77daa |
optional_policy(`
|
|
Chris PeBenito |
b77daa |
pulseaudio_role($1, mozilla_t)
|
|
Chris PeBenito |
b77daa |
')
|
|
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 |
b77daa |
allow $1 mozilla_home_t:lnk_file read_lnk_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 |
b77daa |
## <summary>
|
|
Chris PeBenito |
b77daa |
## Dontaudit attempts to read/write mozilla home directory content
|
|
Chris PeBenito |
b77daa |
## </summary>
|
|
Chris PeBenito |
b77daa |
## <param name="domain">
|
|
Chris PeBenito |
b77daa |
## <summary>
|
|
Dominick Grift |
03b866 |
## Domain to not audit.
|
|
Chris PeBenito |
b77daa |
## </summary>
|
|
Chris PeBenito |
b77daa |
## </param>
|
|
Chris PeBenito |
b77daa |
#
|
|
Chris PeBenito |
b77daa |
interface(`mozilla_dontaudit_rw_user_home_files',`
|
|
Chris PeBenito |
b77daa |
gen_require(`
|
|
Chris PeBenito |
b77daa |
type mozilla_home_t;
|
|
Chris PeBenito |
b77daa |
')
|
|
Chris PeBenito |
b77daa |
|
|
Dan Walsh |
3eaa99 |
dontaudit $1 mozilla_home_t:file rw_inherited_file_perms;
|
|
Chris PeBenito |
b77daa |
')
|
|
Chris PeBenito |
b77daa |
|
|
Chris PeBenito |
b77daa |
########################################
|
|
Chris PeBenito |
b77daa |
## <summary>
|
|
Chris PeBenito |
b77daa |
## Dontaudit attempts to write mozilla home directory content
|
|
Chris PeBenito |
b77daa |
## </summary>
|
|
Chris PeBenito |
b77daa |
## <param name="domain">
|
|
Chris PeBenito |
b77daa |
## <summary>
|
|
Dominick Grift |
03b866 |
## Domain to not audit.
|
|
Chris PeBenito |
b77daa |
## </summary>
|
|
Chris PeBenito |
b77daa |
## </param>
|
|
Chris PeBenito |
b77daa |
#
|
|
Chris PeBenito |
b77daa |
interface(`mozilla_dontaudit_manage_user_home_files',`
|
|
Chris PeBenito |
b77daa |
gen_require(`
|
|
Chris PeBenito |
b77daa |
type mozilla_home_t;
|
|
Chris PeBenito |
b77daa |
')
|
|
Chris PeBenito |
b77daa |
|
|
Chris PeBenito |
b77daa |
dontaudit $1 mozilla_home_t:dir manage_dir_perms;
|
|
Chris PeBenito |
b77daa |
dontaudit $1 mozilla_home_t:file manage_file_perms;
|
|
Chris PeBenito |
b77daa |
')
|
|
Chris PeBenito |
b77daa |
|
|
Chris PeBenito |
b77daa |
########################################
|
|
Chris PeBenito |
3c1e8f |
## <summary>
|
|
Chris PeBenito |
3c1e8f |
## Execmod mozilla home directory content.
|
|
Chris PeBenito |
3c1e8f |
## </summary>
|
|
Chris PeBenito |
3c1e8f |
## <param name="domain">
|
|
Chris PeBenito |
3c1e8f |
## <summary>
|
|
Chris PeBenito |
3c1e8f |
## Domain allowed access.
|
|
Chris PeBenito |
3c1e8f |
## </summary>
|
|
Chris PeBenito |
3c1e8f |
## </param>
|
|
Chris PeBenito |
3c1e8f |
#
|
|
Chris PeBenito |
3c1e8f |
interface(`mozilla_execmod_user_home_files',`
|
|
Chris PeBenito |
3c1e8f |
gen_require(`
|
|
Chris PeBenito |
3c1e8f |
type mozilla_home_t;
|
|
Chris PeBenito |
3c1e8f |
')
|
|
Chris PeBenito |
3c1e8f |
|
|
Chris PeBenito |
3c1e8f |
allow $1 mozilla_home_t:file execmod;
|
|
Chris PeBenito |
3c1e8f |
')
|
|
Chris PeBenito |
3c1e8f |
|
|
Chris PeBenito |
3c1e8f |
########################################
|
|
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>
|
|
Dominick Grift |
03b866 |
## Domain allowed to transition.
|
|
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>
|
|
Dan Walsh |
3eaa99 |
## Execute a domain transition to run mozilla_plugin.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`mozilla_domtrans_plugin',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type mozilla_plugin_t, mozilla_plugin_exec_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
domtrans_pattern($1, mozilla_plugin_exec_t, mozilla_plugin_t)
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Execute mozilla_plugin in the mozilla_plugin domain, and
|
|
Dan Walsh |
3eaa99 |
## allow the specified role the mozilla_plugin domain.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## <param name="domain">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## Domain allowed access
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
## <param name="role">
|
|
Dan Walsh |
3eaa99 |
## <summary>
|
|
Dan Walsh |
3eaa99 |
## The role to be allowed the mozilla_plugin domain.
|
|
Dan Walsh |
3eaa99 |
## </summary>
|
|
Dan Walsh |
3eaa99 |
## </param>
|
|
Dan Walsh |
3eaa99 |
#
|
|
Dan Walsh |
3eaa99 |
interface(`mozilla_run_plugin',`
|
|
Dan Walsh |
3eaa99 |
gen_require(`
|
|
Dan Walsh |
3eaa99 |
type mozilla_plugin_t;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
mozilla_domtrans_plugin($1)
|
|
Dan Walsh |
3eaa99 |
role $2 types mozilla_plugin_t;
|
|
Dan Walsh |
f5b49a |
|
|
Dan Walsh |
f5b49a |
allow mozilla_plugin_t $1:process signull;
|
|
Dan Walsh |
3eaa99 |
')
|
|
Dan Walsh |
3eaa99 |
|
|
Dan Walsh |
3eaa99 |
########################################
|
|
Dan Walsh |
3eaa99 |
## <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 |
')
|