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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
|
policy_module(wireshark, 2.0.1)
########################################
#
# Declarations
#
type wireshark_t;
type wireshark_exec_t;
typealias wireshark_t alias { user_wireshark_t staff_wireshark_t sysadm_wireshark_t };
typealias wireshark_t alias { auditadm_wireshark_t secadm_wireshark_t };
application_domain(wireshark_t, wireshark_exec_t)
ubac_constrained(wireshark_t)
type wireshark_home_t;
typealias wireshark_home_t alias { user_wireshark_home_t staff_wireshark_home_t sysadm_wireshark_home_t };
typealias wireshark_home_t alias { auditadm_wireshark_home_t secadm_wireshark_home_t };
files_poly_member(wireshark_home_t)
userdom_user_home_content(wireshark_home_t)
type wireshark_tmp_t;
typealias wireshark_tmp_t alias { user_wireshark_tmp_t staff_wireshark_tmp_t sysadm_wireshark_tmp_t };
typealias wireshark_tmp_t alias { auditadm_wireshark_tmp_t secadm_wireshark_tmp_t };
files_tmp_file(wireshark_tmp_t)
ubac_constrained(wireshark_tmp_t)
type wireshark_tmpfs_t;
typealias wireshark_tmpfs_t alias { user_wireshark_tmpfs_t staff_wireshark_tmpfs_t sysadm_wireshark_tmpfs_t };
typealias wireshark_tmpfs_t alias { auditadm_wireshark_tmpfs_t secadm_wireshark_tmpfs_t };
files_tmpfs_file(wireshark_tmpfs_t)
ubac_constrained(wireshark_tmpfs_t)
##############################
#
# Local Policy
#
allow wireshark_t self:capability { net_admin net_raw setgid };
allow wireshark_t self:process { signal getsched };
allow wireshark_t self:fifo_file { getattr read write };
allow wireshark_t self:shm destroy;
allow wireshark_t self:shm create_shm_perms;
allow wireshark_t self:netlink_route_socket { nlmsg_read create_socket_perms };
allow wireshark_t self:packet_socket { setopt bind ioctl getopt create read };
allow wireshark_t self:tcp_socket create_socket_perms;
allow wireshark_t self:udp_socket create_socket_perms;
# Re-execute itself (why?)
can_exec(wireshark_t, wireshark_exec_t)
corecmd_search_bin(wireshark_t)
# /home/.wireshark
manage_dirs_pattern(wireshark_t, wireshark_home_t, wireshark_home_t)
manage_files_pattern(wireshark_t, wireshark_home_t, wireshark_home_t)
manage_lnk_files_pattern(wireshark_t, wireshark_home_t, wireshark_home_t)
userdom_user_home_dir_filetrans(wireshark_t, wireshark_home_t, dir)
# Store temporary files
manage_dirs_pattern(wireshark_t, wireshark_tmp_t, wireshark_tmp_t)
manage_files_pattern(wireshark_t, wireshark_tmp_t, wireshark_tmp_t)
files_tmp_filetrans(wireshark_t, wireshark_tmp_t, { dir file })
manage_dirs_pattern(wireshark_t, wireshark_tmpfs_t, wireshark_tmpfs_t)
manage_files_pattern(wireshark_t, wireshark_tmpfs_t, wireshark_tmpfs_t)
manage_lnk_files_pattern(wireshark_t, wireshark_tmpfs_t, wireshark_tmpfs_t)
manage_sock_files_pattern(wireshark_t, wireshark_tmpfs_t, wireshark_tmpfs_t)
manage_fifo_files_pattern(wireshark_t, wireshark_tmpfs_t, wireshark_tmpfs_t)
fs_tmpfs_filetrans(wireshark_t, wireshark_tmpfs_t,{ dir file lnk_file sock_file fifo_file })
kernel_read_kernel_sysctls(wireshark_t)
kernel_read_system_state(wireshark_t)
kernel_read_sysctl(wireshark_t)
corecmd_search_bin(wireshark_t)
corenet_tcp_connect_generic_port(wireshark_t)
corenet_tcp_sendrecv_generic_if(wireshark_t)
dev_read_urand(wireshark_t)
files_read_etc_files(wireshark_t)
files_read_usr_files(wireshark_t)
fs_list_inotifyfs(wireshark_t)
fs_search_auto_mountpoints(wireshark_t)
libs_read_lib_files(wireshark_t)
miscfiles_read_fonts(wireshark_t)
miscfiles_read_localization(wireshark_t)
seutil_use_newrole_fds(wireshark_t)
sysnet_read_config(wireshark_t)
userdom_manage_user_home_content_files(wireshark_t)
tunable_policy(`use_nfs_home_dirs',`
fs_manage_nfs_dirs(wireshark_t)
fs_manage_nfs_files(wireshark_t)
fs_manage_nfs_symlinks(wireshark_t)
')
tunable_policy(`use_samba_home_dirs',`
fs_manage_cifs_dirs(wireshark_t)
fs_manage_cifs_files(wireshark_t)
fs_manage_cifs_symlinks(wireshark_t)
')
optional_policy(`
nscd_socket_use(wireshark_t)
')
# Manual transition from userhelper
optional_policy(`
userhelper_use_fd(wireshark_t)
userhelper_sigchld(wireshark_t)
')
optional_policy(`
xserver_user_x_domain_template(wireshark, wireshark_t, wireshark_tmpfs_t)
xserver_create_xdm_tmp_sockets(wireshark_t)
')
|