aboutsummaryrefslogtreecommitdiff
blob: e9dc8f9a0056c7abebae902695cb89e64a2b20c6 (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
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
policy_module(userhelper, 1.11.1)

########################################
#
# Declarations
#

attribute consolehelper_type;
attribute userhelper_type;

attribute_role consolehelper_roles;
attribute_role userhelper_roles;

type userhelper_conf_t;
files_config_file(userhelper_conf_t)

type userhelper_exec_t;
application_executable_file(userhelper_exec_t)

type consolehelper_exec_t;
application_executable_file(consolehelper_exec_t)

########################################
#
# Common consolehelper domain local policy
#

allow consolehelper_type self:capability { dac_override setgid setuid };
allow consolehelper_type self:process signal;
allow consolehelper_type self:fifo_file rw_fifo_file_perms;
allow consolehelper_type self:unix_stream_socket create_stream_socket_perms;
allow consolehelper_type self:shm create_shm_perms;

dontaudit consolehelper_type userhelper_conf_t:file audit_access;
read_files_pattern(consolehelper_type, userhelper_conf_t, userhelper_conf_t)

domain_use_interactive_fds(consolehelper_type)

kernel_read_system_state(consolehelper_type)
kernel_read_kernel_sysctls(consolehelper_type)

corecmd_exec_bin(consolehelper_type)

dev_getattr_all_chr_files(consolehelper_type)
dev_dontaudit_list_all_dev_nodes(consolehelper_type)

files_read_config_files(consolehelper_type)
files_read_usr_files(consolehelper_type)

fs_getattr_all_dirs(consolehelper_type)
fs_getattr_all_fs(consolehelper_type)
fs_search_auto_mountpoints(consolehelper_type)
files_search_mnt(consolehelper_type)

term_list_ptys(consolehelper_type)

auth_search_pam_console_data(consolehelper_type)
auth_read_pam_pid(consolehelper_type)

miscfiles_read_localization(consolehelper_type)
miscfiles_read_fonts(consolehelper_type)

userhelper_exec(consolehelper_type)

userdom_use_user_terminals(consolehelper_type)

# might want to make this consolehelper_tmp_t
userdom_manage_user_tmp_dirs(consolehelper_type)
userdom_manage_user_tmp_files(consolehelper_type)
userdom_tmp_filetrans_user_tmp(consolehelper_type, { dir file })
userdom_user_runtime_filetrans_user_tmp(consolehelper_type, { dir file })

tunable_policy(`use_nfs_home_dirs',`
	fs_search_nfs(consolehelper_type)
')

tunable_policy(`use_samba_home_dirs',`
	fs_search_cifs(consolehelper_type)
')

optional_policy(`
	shutdown_run(consolehelper_type, consolehelper_roles)
	shutdown_signal(consolehelper_type)
')

optional_policy(`
	xserver_domtrans_xauth(consolehelper_type)
	xserver_read_xdm_pid(consolehelper_type)
	xserver_stream_connect(consolehelper_type)
')

########################################
#
# Common userhelper domain local policy
#

allow userhelper_type self:capability { chown dac_override net_bind_service setgid setuid sys_tty_config };
allow userhelper_type self:process { transition signal_perms getsched setsched getsession getpgid setpgid getcap setcap share getattr setexec noatsecure siginh rlimitinh dyntransition setkeycreate setsockcreate getrlimit };
allow userhelper_type self:fd use;
allow userhelper_type self:fifo_file rw_fifo_file_perms;
allow userhelper_type self:shm create_shm_perms;
allow userhelper_type self:sem create_sem_perms;
allow userhelper_type self:msgq create_msgq_perms;
allow userhelper_type self:msg { send receive };
allow userhelper_type self:unix_dgram_socket sendto;
allow userhelper_type self:unix_stream_socket { accept connectto listen };

dontaudit userhelper_type userhelper_conf_t:file audit_access;
read_files_pattern(userhelper_type, userhelper_conf_t, userhelper_conf_t)

can_exec(userhelper_type, userhelper_exec_t)

kernel_read_all_sysctls(userhelper_type)
kernel_getattr_debugfs(userhelper_type)
kernel_read_system_state(userhelper_type)

corecmd_exec_shell(userhelper_type)

domain_use_interactive_fds(userhelper_type)
domain_sigchld_interactive_fds(userhelper_type)

dev_read_urand(userhelper_type)
dev_list_all_dev_nodes(userhelper_type)

files_list_var_lib(userhelper_type)
files_read_var_files(userhelper_type)
files_read_var_symlinks(userhelper_type)
files_search_home(userhelper_type)

fs_getattr_all_fs(userhelper_type)
fs_search_auto_mountpoints(userhelper_type)

selinux_get_fs_mount(userhelper_type)
selinux_validate_context(userhelper_type)
selinux_compute_access_vector(userhelper_type)
selinux_compute_create_context(userhelper_type)
selinux_compute_relabel_context(userhelper_type)
selinux_compute_user_contexts(userhelper_type)

term_list_ptys(userhelper_type)
term_relabel_all_ttys(userhelper_type)
term_relabel_all_ptys(userhelper_type)
term_use_all_ttys(userhelper_type)
term_use_all_ptys(userhelper_type)

auth_manage_pam_pid(userhelper_type)
auth_manage_var_auth(userhelper_type)
auth_search_pam_console_data(userhelper_type)

init_use_fds(userhelper_type)
init_manage_utmp(userhelper_type)
init_runtime_filetrans_utmp(userhelper_type)

logging_send_syslog_msg(userhelper_type)

miscfiles_read_localization(userhelper_type)

seutil_read_config(userhelper_type)
seutil_read_default_contexts(userhelper_type)

optional_policy(`
	rpm_domtrans(userhelper_type)
')