aboutsummaryrefslogtreecommitdiff
blob: 0736a7afb862dbbace9e24c6cbd2786db95b65b1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
policy_module(googletalk, 0.1)

type googletalk_plugin_t;
type googletalk_plugin_exec_t;
application_domain(googletalk_plugin_t, googletalk_plugin_exec_t)

type googletalk_plugin_tmp_t;
userdom_user_tmp_file(googletalk_plugin_tmp_t)

type googletalk_plugin_tmpfs_t;
userdom_user_tmpfs_file(googletalk_plugin_tmpfs_t)

type googletalk_plugin_xdg_config_t;
xdg_config_home_content(googletalk_plugin_xdg_config_t)

####################################
#
# Google talk plugin policy
#

allow googletalk_plugin_t self:process signal;
allow googletalk_plugin_t self:fifo_file rw_fifo_file_perms;
allow googletalk_plugin_t self:netlink_kobject_uevent_socket create_socket_perms;
allow googletalk_plugin_t self:netlink_route_socket create_netlink_socket_perms;
allow googletalk_plugin_t self:tcp_socket create_stream_socket_perms;
allow googletalk_plugin_t self:udp_socket create_socket_perms;
allow googletalk_plugin_t self:unix_stream_socket create_stream_socket_perms;

manage_files_pattern(googletalk_plugin_t, googletalk_plugin_tmp_t, googletalk_plugin_tmp_t)
manage_dirs_pattern(googletalk_plugin_t, googletalk_plugin_tmp_t, googletalk_plugin_tmp_t)
files_tmp_filetrans(googletalk_plugin_t, googletalk_plugin_tmp_t, { file dir })

manage_files_pattern(googletalk_plugin_t, googletalk_plugin_tmpfs_t, googletalk_plugin_tmpfs_t)
fs_tmpfs_filetrans(googletalk_plugin_t, googletalk_plugin_tmpfs_t, file)

manage_dirs_pattern(googletalk_plugin_t, googletalk_plugin_xdg_config_t, googletalk_plugin_xdg_config_t)
manage_files_pattern(googletalk_plugin_t, googletalk_plugin_xdg_config_t, googletalk_plugin_xdg_config_t)

kernel_read_system_state(googletalk_plugin_t)

corecmd_exec_bin(googletalk_plugin_t)
corecmd_exec_shell(googletalk_plugin_t)

corenet_tcp_bind_generic_node(googletalk_plugin_t)
corenet_tcp_sendrecv_generic_if(googletalk_plugin_t)
corenet_tcp_sendrecv_generic_node(googletalk_plugin_t)

corenet_udp_bind_generic_node(googletalk_plugin_t)

dev_getattr_all_blk_files(googletalk_plugin_t)
dev_getattr_all_chr_files(googletalk_plugin_t)
dev_read_sound(googletalk_plugin_t)
dev_read_video_dev(googletalk_plugin_t)
dev_search_sysfs(googletalk_plugin_t)
dev_write_sound(googletalk_plugin_t)
dev_write_video_dev(googletalk_plugin_t)

# It runs find in /etc to find any release file for knowing the distribution it
# runs on. Yes, great isnt it...
files_dontaudit_getattr_all_dirs(googletalk_plugin_t)
files_read_etc_files(googletalk_plugin_t)
files_read_usr_files(googletalk_plugin_t)

fs_getattr_tmpfs(googletalk_plugin_t)

term_dontaudit_getattr_unallocated_ttys(googletalk_plugin_t)

# Needed to find video device?
init_getattr_initctl(googletalk_plugin_t)

logging_send_syslog_msg(googletalk_plugin_t)

miscfiles_read_localization(googletalk_plugin_t)

sysnet_read_config(googletalk_plugin_t)

userdom_search_user_home_content(googletalk_plugin_t)
userdom_use_user_terminals(googletalk_plugin_t)

googletalk_generic_xdg_config_home_filetrans_plugin_xdg_config(googletalk_plugin_t, dir, "google-googletalkplugin")

optional_policy(`
	dbus_system_bus_client(googletalk_plugin_t)
')

optional_policy(`
	mozilla_dontaudit_use_fds(googletalk_plugin_t)
	mozilla_send_dgram_plugin(googletalk_plugin_t)
')

optional_policy(`
	xdg_search_config_home_dirs(googletalk_plugin_t)
')

optional_policy(`
	xserver_user_x_domain_template(googletalk_plugin, googletalk_plugin_t, googletalk_plugin_tmpfs_t)
')

ifdef(`use_alsa',`
	optional_policy(`
		alsa_domain(googletalk_plugin_t, googletalk_plugin_tmpfs_t)
	')
')