]> git.ipfire.org Git - people/stevee/selinux-policy.git/blob - policy/modules/apps/ethereal.te
trunk: merge UBAC.
[people/stevee/selinux-policy.git] / policy / modules / apps / ethereal.te
1
2 policy_module(ethereal, 2.0.0)
3
4 ########################################
5 #
6 # Declarations
7 #
8
9 type ethereal_t;
10 type ethereal_exec_t;
11 typealias ethereal_t alias { user_ethereal_t staff_ethereal_t sysadm_ethereal_t };
12 typealias ethereal_t alias { auditadm_ethereal_t secadm_ethereal_t };
13 application_domain(ethereal_t, ethereal_exec_t)
14 ubac_constrained(ethereal_t)
15
16 type ethereal_home_t;
17 typealias ethereal_home_t alias { user_ethereal_home_t staff_ethereal_home_t sysadm_ethereal_home_t };
18 typealias ethereal_home_t alias { auditadm_ethereal_home_t secadm_ethereal_home_t };
19 files_poly_member(ethereal_home_t)
20 userdom_user_home_content(ethereal_home_t)
21
22 type ethereal_tmp_t;
23 typealias ethereal_tmp_t alias { user_ethereal_tmp_t staff_ethereal_tmp_t sysadm_ethereal_tmp_t };
24 typealias ethereal_tmp_t alias { auditadm_ethereal_tmp_t secadm_ethereal_tmp_t };
25 files_tmp_file(ethereal_tmp_t)
26 ubac_constrained(ethereal_tmp_t)
27
28 type ethereal_tmpfs_t;
29 typealias ethereal_tmpfs_t alias { user_ethereal_tmpfs_t staff_ethereal_tmpfs_t sysadm_ethereal_tmpfs_t };
30 typealias ethereal_tmpfs_t alias { auditadm_ethereal_tmpfs_t secadm_ethereal_tmpfs_t };
31 files_tmpfs_file(ethereal_tmpfs_t)
32 ubac_constrained(ethereal_tmpfs_t)
33
34 type tethereal_t;
35 type tethereal_exec_t;
36 application_domain(tethereal_t, tethereal_exec_t)
37
38 type tethereal_tmp_t;
39 files_tmp_file(tethereal_tmp_t)
40
41 ##############################
42 #
43 # Local Policy
44 #
45
46 allow ethereal_t self:capability { net_admin net_raw setgid };
47 allow ethereal_t self:process { signal getsched };
48 allow ethereal_t self:fifo_file { getattr read write };
49 allow ethereal_t self:shm destroy;
50 allow ethereal_t self:shm create_shm_perms;
51 allow ethereal_t self:netlink_route_socket { nlmsg_read create_socket_perms };
52 allow ethereal_t self:packet_socket { setopt bind ioctl getopt create read };
53 allow ethereal_t self:tcp_socket create_socket_perms;
54 allow ethereal_t self:udp_socket create_socket_perms;
55
56 # Re-execute itself (why?)
57 can_exec(ethereal_t, ethereal_exec_t)
58 corecmd_search_bin(ethereal_t)
59
60 # /home/.ethereal
61 manage_dirs_pattern(ethereal_t, ethereal_home_t, ethereal_home_t)
62 manage_files_pattern(ethereal_t, ethereal_home_t, ethereal_home_t)
63 manage_lnk_files_pattern(ethereal_t, ethereal_home_t, ethereal_home_t)
64 userdom_user_home_dir_filetrans(ethereal_t, ethereal_home_t, dir)
65
66 # Store temporary files
67 manage_dirs_pattern(ethereal_t, ethereal_tmp_t, ethereal_tmp_t)
68 manage_files_pattern(ethereal_t, ethereal_tmp_t, ethereal_tmp_t)
69 files_tmp_filetrans(ethereal_t, ethereal_tmp_t, { dir file })
70
71 manage_dirs_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
72 manage_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
73 manage_lnk_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
74 manage_sock_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
75 manage_fifo_files_pattern(ethereal_t, ethereal_tmpfs_t, ethereal_tmpfs_t)
76 fs_tmpfs_filetrans(ethereal_t, ethereal_tmpfs_t, { dir file lnk_file sock_file fifo_file })
77
78 kernel_read_kernel_sysctls(ethereal_t)
79 kernel_read_system_state(ethereal_t)
80 kernel_read_sysctl(ethereal_t)
81
82 corecmd_search_bin(ethereal_t)
83
84 corenet_tcp_connect_generic_port(ethereal_t)
85 corenet_tcp_sendrecv_generic_if(ethereal_t)
86
87 dev_read_urand(ethereal_t)
88
89 files_read_etc_files(ethereal_t)
90 files_read_usr_files(ethereal_t)
91
92 fs_list_inotifyfs(ethereal_t)
93 fs_search_auto_mountpoints(ethereal_t)
94
95 libs_read_lib_files(ethereal_t)
96
97 miscfiles_read_fonts(ethereal_t)
98 miscfiles_read_localization(ethereal_t)
99
100 seutil_use_newrole_fds(ethereal_t)
101
102 sysnet_read_config(ethereal_t)
103
104 userdom_manage_user_home_content_files(ethereal_t)
105 userdom_use_user_terminals(ethereal_t)
106
107 tunable_policy(`use_nfs_home_dirs',`
108 fs_manage_nfs_dirs(ethereal_t)
109 fs_manage_nfs_files(ethereal_t)
110 fs_manage_nfs_symlinks(ethereal_t)
111 ')
112
113 tunable_policy(`use_samba_home_dirs',`
114 fs_manage_cifs_dirs(ethereal_t)
115 fs_manage_cifs_files(ethereal_t)
116 fs_manage_cifs_symlinks(ethereal_t)
117 ')
118
119 optional_policy(`
120 nscd_socket_use(ethereal_t)
121 ')
122
123 # Manual transition from userhelper
124 optional_policy(`
125 userhelper_use_fd(ethereal_t)
126 userhelper_sigchld(ethereal_t)
127 ')
128
129 optional_policy(`
130 xserver_user_x_domain_template(ethereal, ethereal_t, ethereal_tmpfs_t)
131 xserver_create_xdm_tmp_sockets(ethereal_t)
132 ')
133
134 ########################################
135 #
136 # Tethereal policy
137 #
138
139 allow tethereal_t tethereal_t : capability { dac_override dac_read_search setgid setuid net_raw };
140 allow tethereal_t self:unix_stream_socket create_stream_socket_perms;
141 allow tethereal_t self:netlink_route_socket create_netlink_socket_perms;
142 allow tethereal_t self:packet_socket create_socket_perms;
143 allow tethereal_t self:tcp_socket create_socket_perms;
144 allow tethereal_t self:udp_socket create_socket_perms;
145
146 # Store temporary files
147 manage_dirs_pattern(tethereal_t, tethereal_tmp_t, tethereal_tmp_t)
148 manage_files_pattern(tethereal_t, tethereal_tmp_t, tethereal_tmp_t)
149 files_tmp_filetrans(tethereal_t, tethereal_tmp_t, { dir file })
150
151 # /proc
152 kernel_read_all_sysctls(tethereal_t)
153 kernel_read_system_state(tethereal_t)
154
155 # Read ethereal files in /usr
156 files_read_usr_files(tethereal_t)
157 # /etc/nsswitch.conf
158 files_read_etc_files(tethereal_t)
159
160 miscfiles_read_localization(tethereal_t)
161
162 seutil_use_newrole_fds(tethereal_t)
163
164 sysnet_dns_name_resolve(tethereal_t)
165
166 userdom_use_user_terminals(tethereal_t)
167
168 optional_policy(`
169 nscd_socket_use(tethereal_t)
170 ')