1hplip_selinux(8) SELinux Policy hplip hplip_selinux(8)
2
3
4
6 hplip_selinux - Security Enhanced Linux Policy for the hplip processes
7
9 Security-Enhanced Linux secures the hplip processes via flexible manda‐
10 tory access control.
11
12 The hplip processes execute with the hplip_t SELinux type. You can
13 check if you have these processes running by executing the ps command
14 with the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep hplip_t
19
20
21
23 The hplip_t SELinux type can be entered via the hplip_exec_t file type.
24
25 The default entrypoint paths for the hplip_t domain are the following:
26
27 /usr/sbin/hp-[^/]+, /usr/share/hplip/.*.py, /usr/lib/cups/backend/hp.*,
28 /usr/lib64/cups/backend/hp.*, /usr/bin/hpijs, /usr/sbin/hpiod
29
31 SELinux defines process types (domains) for each process running on the
32 system
33
34 You can see the context of a process using the -Z option to ps
35
36 Policy governs the access confined processes have to files. SELinux
37 hplip policy is very flexible allowing users to setup their hplip pro‐
38 cesses in as secure a method as possible.
39
40 The following process types are defined for hplip:
41
42 hplip_t
43
44 Note: semanage permissive -a hplip_t can be used to make the process
45 type hplip_t permissive. SELinux does not deny access to permissive
46 process types, but the AVC (SELinux denials) messages are still gener‐
47 ated.
48
49
51 SELinux policy is customizable based on least access required. hplip
52 policy is extremely flexible and has several booleans that allow you to
53 manipulate the policy and run hplip with the tightest access possible.
54
55
56
57 If you want to allow all daemons to write corefiles to /, you must turn
58 on the allow_daemons_dump_core boolean. Disabled by default.
59
60 setsebool -P allow_daemons_dump_core 1
61
62
63
64 If you want to allow all daemons to use tcp wrappers, you must turn on
65 the allow_daemons_use_tcp_wrapper boolean. Disabled by default.
66
67 setsebool -P allow_daemons_use_tcp_wrapper 1
68
69
70
71 If you want to allow all daemons the ability to read/write terminals,
72 you must turn on the allow_daemons_use_tty boolean. Disabled by
73 default.
74
75 setsebool -P allow_daemons_use_tty 1
76
77
78
79 If you want to allow all domains to use other domains file descriptors,
80 you must turn on the allow_domain_fd_use boolean. Enabled by default.
81
82 setsebool -P allow_domain_fd_use 1
83
84
85
86 If you want to allow sysadm to debug or ptrace all processes, you must
87 turn on the allow_ptrace boolean. Disabled by default.
88
89 setsebool -P allow_ptrace 1
90
91
92
93 If you want to enable cluster mode for daemons, you must turn on the
94 daemons_enable_cluster_mode boolean. Disabled by default.
95
96 setsebool -P daemons_enable_cluster_mode 1
97
98
99
100 If you want to allow all domains to have the kernel load modules, you
101 must turn on the domain_kernel_load_modules boolean. Disabled by
102 default.
103
104 setsebool -P domain_kernel_load_modules 1
105
106
107
108 If you want to allow all domains to execute in fips_mode, you must turn
109 on the fips_mode boolean. Enabled by default.
110
111 setsebool -P fips_mode 1
112
113
114
115 If you want to enable reading of urandom for all domains, you must turn
116 on the global_ssp boolean. Disabled by default.
117
118 setsebool -P global_ssp 1
119
120
121
122 If you want to enable support for upstart as the init program, you must
123 turn on the init_upstart boolean. Enabled by default.
124
125 setsebool -P init_upstart 1
126
127
128
130 SELinux defines port types to represent TCP and UDP ports.
131
132 You can see the types associated with a port by using the following
133 command:
134
135 semanage port -l
136
137
138 Policy governs the access confined processes have to these ports.
139 SELinux hplip policy is very flexible allowing users to setup their
140 hplip processes in as secure a method as possible.
141
142 The following port types are defined for hplip:
143
144
145 hplip_port_t
146
147
148
149 Default Defined Ports:
150 tcp
151 1782,2207,2208,8290,50000,50002,8292,9100,9101,9102,9220,9221,9222,9280,9281,9282,9290,9291
152
154 The SELinux process type hplip_t can manage files labeled with the fol‐
155 lowing file types. The paths listed are the default paths for these
156 file types. Note the processes UID still need to have DAC permissions.
157
158 anon_inodefs_t
159
160
161 cluster_conf_t
162
163 /etc/cluster(/.*)?
164
165 cluster_var_lib_t
166
167 /var/lib(64)?/openais(/.*)?
168 /var/lib(64)?/pengine(/.*)?
169 /var/lib(64)?/corosync(/.*)?
170 /usr/lib(64)?/heartbeat(/.*)?
171 /var/lib(64)?/heartbeat(/.*)?
172 /var/lib(64)?/pacemaker(/.*)?
173 /var/lib/cluster(/.*)?
174
175 cluster_var_run_t
176
177 /var/run/crm(/.*)?
178 /var/run/cman_.*
179 /var/run/rsctmp(/.*)?
180 /var/run/aisexec.*
181 /var/run/heartbeat(/.*)?
182 /var/run/cpglockd.pid
183 /var/run/corosync.pid
184 /var/run/rgmanager.pid
185 /var/run/cluster/rgmanager.sk
186
187 cupsd_tmp_t
188
189
190 hplip_var_lib_t
191
192 /var/lib/hp(/.*)?
193
194 hplip_var_run_t
195
196 /var/run/hp.*.pid
197 /var/run/hp.*.port
198
199 initrc_tmp_t
200
201
202 mnt_t
203
204 /mnt(/[^/]*)
205 /mnt(/[^/]*)?
206 /rhev(/[^/]*)?
207 /media(/[^/]*)
208 /media(/[^/]*)?
209 /etc/rhgb(/.*)?
210 /media/.hal-.*
211 /net
212 /afs
213 /rhev
214 /misc
215
216 print_spool_t
217
218 /var/spool/lpd(/.*)?
219 /var/spool/cups(/.*)?
220 /var/spool/cups-pdf(/.*)?
221
222 root_t
223
224 /
225 /initrd
226
227 tmp_t
228
229 /tmp
230 /usr/tmp
231 /var/tmp
232 /tmp-inst
233 /var/tmp-inst
234 /var/tmp/vi.recover
235
236 usbfs_t
237
238
239
241 SELinux requires files to have an extended attribute to define the file
242 type.
243
244 You can see the context of a file using the -Z option to ls
245
246 Policy governs the access confined processes have to these files.
247 SELinux hplip policy is very flexible allowing users to setup their
248 hplip processes in as secure a method as possible.
249
250 STANDARD FILE CONTEXT
251
252 SELinux defines the file context types for the hplip, if you wanted to
253 store files with these types in a diffent paths, you need to execute
254 the semanage command to sepecify alternate labeling and then use
255 restorecon to put the labels on disk.
256
257 semanage fcontext -a -t hplip_var_run_t '/srv/myhplip_content(/.*)?'
258 restorecon -R -v /srv/myhplip_content
259
260 Note: SELinux often uses regular expressions to specify labels that
261 match multiple files.
262
263 The following file types are defined for hplip:
264
265
266
267 hplip_etc_t
268
269 - Set files with the hplip_etc_t type, if you want to store hplip files
270 in the /etc directories.
271
272
273
274 hplip_exec_t
275
276 - Set files with the hplip_exec_t type, if you want to transition an
277 executable to the hplip_t domain.
278
279
280 Paths:
281 /usr/sbin/hp-[^/]+, /usr/share/hplip/.*.py, /usr/lib/cups/back‐
282 end/hp.*, /usr/lib64/cups/backend/hp.*, /usr/bin/hpijs,
283 /usr/sbin/hpiod
284
285
286 hplip_tmp_t
287
288 - Set files with the hplip_tmp_t type, if you want to store hplip tem‐
289 porary files in the /tmp directories.
290
291
292
293 hplip_var_lib_t
294
295 - Set files with the hplip_var_lib_t type, if you want to store the
296 hplip files under the /var/lib directory.
297
298
299
300 hplip_var_run_t
301
302 - Set files with the hplip_var_run_t type, if you want to store the
303 hplip files under the /run or /var/run directory.
304
305
306 Paths:
307 /var/run/hp.*.pid, /var/run/hp.*.port
308
309
310 Note: File context can be temporarily modified with the chcon command.
311 If you want to permanently change the file context you need to use the
312 semanage fcontext command. This will modify the SELinux labeling data‐
313 base. You will need to use restorecon to apply the labels.
314
315
317 semanage fcontext can also be used to manipulate default file context
318 mappings.
319
320 semanage permissive can also be used to manipulate whether or not a
321 process type is permissive.
322
323 semanage module can also be used to enable/disable/install/remove pol‐
324 icy modules.
325
326 semanage port can also be used to manipulate the port definitions
327
328 semanage boolean can also be used to manipulate the booleans
329
330
331 system-config-selinux is a GUI tool available to customize SELinux pol‐
332 icy settings.
333
334
336 This manual page was auto-generated using sepolicy manpage .
337
338
340 selinux(8), hplip(8), semanage(8), restorecon(8), chcon(1) , setse‐
341 bool(8)
342
343
344
345hplip 15-06-03 hplip_selinux(8)