1apcupsd_selinux(8) SELinux Policy apcupsd apcupsd_selinux(8)
2
3
4
6 apcupsd_selinux - Security Enhanced Linux Policy for the apcupsd pro‐
7 cesses
8
10 Security-Enhanced Linux secures the apcupsd processes via flexible
11 mandatory access control.
12
13 The apcupsd processes execute with the apcupsd_t SELinux type. You can
14 check if you have these processes running by executing the ps command
15 with the -Z qualifier.
16
17 For example:
18
19 ps -eZ | grep apcupsd_t
20
21
22
24 The apcupsd_t SELinux type can be entered via the apcupsd_exec_t file
25 type.
26
27 The default entrypoint paths for the apcupsd_t domain are the follow‐
28 ing:
29
30 /sbin/apcupsd, /usr/sbin/apcupsd
31
33 SELinux defines process types (domains) for each process running on the
34 system
35
36 You can see the context of a process using the -Z option to ps
37
38 Policy governs the access confined processes have to files. SELinux
39 apcupsd policy is very flexible allowing users to setup their apcupsd
40 processes in as secure a method as possible.
41
42 The following process types are defined for apcupsd:
43
44 apcupsd_t, apcupsd_cgi_script_t
45
46 Note: semanage permissive -a apcupsd_t can be used to make the process
47 type apcupsd_t permissive. SELinux does not deny access to permissive
48 process types, but the AVC (SELinux denials) messages are still gener‐
49 ated.
50
51
53 SELinux policy is customizable based on least access required. apcupsd
54 policy is extremely flexible and has several booleans that allow you to
55 manipulate the policy and run apcupsd with the tightest access possi‐
56 ble.
57
58
59
60 If you want to allow all domains to execute in fips_mode, you must turn
61 on the fips_mode boolean. Enabled by default.
62
63 setsebool -P fips_mode 1
64
65
66
68 SELinux defines port types to represent TCP and UDP ports.
69
70 You can see the types associated with a port by using the following
71 command:
72
73 semanage port -l
74
75
76 Policy governs the access confined processes have to these ports.
77 SELinux apcupsd policy is very flexible allowing users to setup their
78 apcupsd processes in as secure a method as possible.
79
80 The following port types are defined for apcupsd:
81
82
83 apcupsd_port_t
84
85
86
87 Default Defined Ports:
88 tcp 3551
89 udp 3551
90
92 The SELinux process type apcupsd_t can manage files labeled with the
93 following file types. The paths listed are the default paths for these
94 file types. Note the processes UID still need to have DAC permissions.
95
96 apcupsd_lock_t
97
98 /var/lock/LCK..
99 /var/lock/subsys/apcupsd
100
101 apcupsd_log_t
102
103 /var/log/apcupsd.events.*
104 /var/log/apcupsd.status.*
105
106 apcupsd_power_t
107
108 /etc/apcupsd/powerfail
109
110 apcupsd_tmp_t
111
112
113 apcupsd_var_run_t
114
115 /var/run/apcupsd.pid
116
117 cluster_conf_t
118
119 /etc/cluster(/.*)?
120
121 cluster_var_lib_t
122
123 /var/lib/pcsd(/.*)?
124 /var/lib/cluster(/.*)?
125 /var/lib/openais(/.*)?
126 /var/lib/pengine(/.*)?
127 /var/lib/corosync(/.*)?
128 /usr/lib/heartbeat(/.*)?
129 /var/lib/heartbeat(/.*)?
130 /var/lib/pacemaker(/.*)?
131
132 cluster_var_run_t
133
134 /var/run/crm(/.*)?
135 /var/run/cman_.*
136 /var/run/rsctmp(/.*)?
137 /var/run/aisexec.*
138 /var/run/heartbeat(/.*)?
139 /var/run/pcsd-ruby.socket
140 /var/run/corosync-qnetd(/.*)?
141 /var/run/corosync-qdevice(/.*)?
142 /var/run/corosync.pid
143 /var/run/cpglockd.pid
144 /var/run/rgmanager.pid
145 /var/run/cluster/rgmanager.sk
146
147 initrc_var_run_t
148
149 /var/run/utmp
150 /var/run/random-seed
151 /var/run/runlevel.dir
152 /var/run/setmixer_flag
153
154 krb5_host_rcache_t
155
156 /var/tmp/krb5_0.rcache2
157 /var/cache/krb5rcache(/.*)?
158 /var/tmp/nfs_0
159 /var/tmp/DNS_25
160 /var/tmp/host_0
161 /var/tmp/imap_0
162 /var/tmp/HTTP_23
163 /var/tmp/HTTP_48
164 /var/tmp/ldap_55
165 /var/tmp/ldap_487
166 /var/tmp/ldapmap1_0
167
168 root_t
169
170 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
171 /
172 /initrd
173
174 systemd_passwd_var_run_t
175
176 /var/run/systemd/ask-password(/.*)?
177 /var/run/systemd/ask-password-block(/.*)?
178
179
181 SELinux requires files to have an extended attribute to define the file
182 type.
183
184 You can see the context of a file using the -Z option to ls
185
186 Policy governs the access confined processes have to these files.
187 SELinux apcupsd policy is very flexible allowing users to setup their
188 apcupsd processes in as secure a method as possible.
189
190 STANDARD FILE CONTEXT
191
192 SELinux defines the file context types for the apcupsd, if you wanted
193 to store files with these types in a diffent paths, you need to execute
194 the semanage command to specify alternate labeling and then use re‐
195 storecon to put the labels on disk.
196
197 semanage fcontext -a -t apcupsd_cgi_ra_content_t '/srv/myapcupsd_con‐
198 tent(/.*)?'
199 restorecon -R -v /srv/myapcupsd_content
200
201 Note: SELinux often uses regular expressions to specify labels that
202 match multiple files.
203
204 The following file types are defined for apcupsd:
205
206
207
208 apcupsd_cgi_content_t
209
210 - Set files with the apcupsd_cgi_content_t type, if you want to treat
211 the files as apcupsd cgi content.
212
213
214
215 apcupsd_cgi_htaccess_t
216
217 - Set files with the apcupsd_cgi_htaccess_t type, if you want to treat
218 the file as a apcupsd cgi access file.
219
220
221
222 apcupsd_cgi_ra_content_t
223
224 - Set files with the apcupsd_cgi_ra_content_t type, if you want to
225 treat the files as apcupsd cgi read/append content.
226
227
228
229 apcupsd_cgi_rw_content_t
230
231 - Set files with the apcupsd_cgi_rw_content_t type, if you want to
232 treat the files as apcupsd cgi read/write content.
233
234
235
236 apcupsd_cgi_script_exec_t
237
238 - Set files with the apcupsd_cgi_script_exec_t type, if you want to
239 transition an executable to the apcupsd_cgi_script_t domain.
240
241
242 Paths:
243 /var/www/cgi-bin/apcgui(/.*)?, /var/www/apcupsd/multimon.cgi,
244 /var/www/apcupsd/upsimage.cgi, /var/www/apcupsd/upsstats.cgi,
245 /var/www/apcupsd/upsfstats.cgi
246
247
248 apcupsd_exec_t
249
250 - Set files with the apcupsd_exec_t type, if you want to transition an
251 executable to the apcupsd_t domain.
252
253
254 Paths:
255 /sbin/apcupsd, /usr/sbin/apcupsd
256
257
258 apcupsd_initrc_exec_t
259
260 - Set files with the apcupsd_initrc_exec_t type, if you want to transi‐
261 tion an executable to the apcupsd_initrc_t domain.
262
263
264
265 apcupsd_lock_t
266
267 - Set files with the apcupsd_lock_t type, if you want to treat the
268 files as apcupsd lock data, stored under the /var/lock directory
269
270
271 Paths:
272 /var/lock/LCK.., /var/lock/subsys/apcupsd
273
274
275 apcupsd_log_t
276
277 - Set files with the apcupsd_log_t type, if you want to treat the data
278 as apcupsd log data, usually stored under the /var/log directory.
279
280
281 Paths:
282 /var/log/apcupsd.events.*, /var/log/apcupsd.status.*
283
284
285 apcupsd_power_t
286
287 - Set files with the apcupsd_power_t type, if you want to treat the
288 files as apcupsd power data.
289
290
291
292 apcupsd_tmp_t
293
294 - Set files with the apcupsd_tmp_t type, if you want to store apcupsd
295 temporary files in the /tmp directories.
296
297
298
299 apcupsd_unit_file_t
300
301 - Set files with the apcupsd_unit_file_t type, if you want to treat the
302 files as apcupsd unit content.
303
304
305
306 apcupsd_var_run_t
307
308 - Set files with the apcupsd_var_run_t type, if you want to store the
309 apcupsd files under the /run or /var/run directory.
310
311
312
313 Note: File context can be temporarily modified with the chcon command.
314 If you want to permanently change the file context you need to use the
315 semanage fcontext command. This will modify the SELinux labeling data‐
316 base. You will need to use restorecon to apply the labels.
317
318
320 semanage fcontext can also be used to manipulate default file context
321 mappings.
322
323 semanage permissive can also be used to manipulate whether or not a
324 process type is permissive.
325
326 semanage module can also be used to enable/disable/install/remove pol‐
327 icy modules.
328
329 semanage port can also be used to manipulate the port definitions
330
331 semanage boolean can also be used to manipulate the booleans
332
333
334 system-config-selinux is a GUI tool available to customize SELinux pol‐
335 icy settings.
336
337
339 This manual page was auto-generated using sepolicy manpage .
340
341
343 selinux(8), apcupsd(8), semanage(8), restorecon(8), chcon(1), sepol‐
344 icy(8), setsebool(8), apcupsd_cgi_script_selinux(8)
345
346
347
348apcupsd 22-05-27 apcupsd_selinux(8)