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_var_run_t
111
112 /var/run/apcupsd.pid
113
114 cluster_conf_t
115
116 /etc/cluster(/.*)?
117
118 cluster_var_lib_t
119
120 /var/lib/pcsd(/.*)?
121 /var/lib/cluster(/.*)?
122 /var/lib/openais(/.*)?
123 /var/lib/pengine(/.*)?
124 /var/lib/corosync(/.*)?
125 /usr/lib/heartbeat(/.*)?
126 /var/lib/heartbeat(/.*)?
127 /var/lib/pacemaker(/.*)?
128
129 cluster_var_run_t
130
131 /var/run/crm(/.*)?
132 /var/run/cman_.*
133 /var/run/rsctmp(/.*)?
134 /var/run/aisexec.*
135 /var/run/heartbeat(/.*)?
136 /var/run/corosync-qnetd(/.*)?
137 /var/run/corosync-qdevice(/.*)?
138 /var/run/corosync.pid
139 /var/run/cpglockd.pid
140 /var/run/rgmanager.pid
141 /var/run/cluster/rgmanager.sk
142
143 initrc_var_run_t
144
145 /var/run/utmp
146 /var/run/random-seed
147 /var/run/runlevel.dir
148 /var/run/setmixer_flag
149
150 root_t
151
152 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
153 /
154 /initrd
155
156 systemd_passwd_var_run_t
157
158 /var/run/systemd/ask-password(/.*)?
159 /var/run/systemd/ask-password-block(/.*)?
160
161
163 SELinux requires files to have an extended attribute to define the file
164 type.
165
166 You can see the context of a file using the -Z option to ls
167
168 Policy governs the access confined processes have to these files.
169 SELinux apcupsd policy is very flexible allowing users to setup their
170 apcupsd processes in as secure a method as possible.
171
172 STANDARD FILE CONTEXT
173
174 SELinux defines the file context types for the apcupsd, if you wanted
175 to store files with these types in a diffent paths, you need to execute
176 the semanage command to sepecify alternate labeling and then use
177 restorecon to put the labels on disk.
178
179 semanage fcontext -a -t apcupsd_cgi_ra_content_t '/srv/myapcupsd_con‐
180 tent(/.*)?'
181 restorecon -R -v /srv/myapcupsd_content
182
183 Note: SELinux often uses regular expressions to specify labels that
184 match multiple files.
185
186 The following file types are defined for apcupsd:
187
188
189
190 apcupsd_cgi_content_t
191
192 - Set files with the apcupsd_cgi_content_t type, if you want to treat
193 the files as apcupsd cgi content.
194
195
196
197 apcupsd_cgi_htaccess_t
198
199 - Set files with the apcupsd_cgi_htaccess_t type, if you want to treat
200 the file as a apcupsd cgi access file.
201
202
203
204 apcupsd_cgi_ra_content_t
205
206 - Set files with the apcupsd_cgi_ra_content_t type, if you want to
207 treat the files as apcupsd cgi read/append content.
208
209
210
211 apcupsd_cgi_rw_content_t
212
213 - Set files with the apcupsd_cgi_rw_content_t type, if you want to
214 treat the files as apcupsd cgi read/write content.
215
216
217
218 apcupsd_cgi_script_exec_t
219
220 - Set files with the apcupsd_cgi_script_exec_t type, if you want to
221 transition an executable to the apcupsd_cgi_script_t domain.
222
223
224 Paths:
225 /var/www/cgi-bin/apcgui(/.*)?, /var/www/apcupsd/multimon.cgi,
226 /var/www/apcupsd/upsimage.cgi, /var/www/apcupsd/upsstats.cgi,
227 /var/www/apcupsd/upsfstats.cgi
228
229
230 apcupsd_exec_t
231
232 - Set files with the apcupsd_exec_t type, if you want to transition an
233 executable to the apcupsd_t domain.
234
235
236 Paths:
237 /sbin/apcupsd, /usr/sbin/apcupsd
238
239
240 apcupsd_initrc_exec_t
241
242 - Set files with the apcupsd_initrc_exec_t type, if you want to transi‐
243 tion an executable to the apcupsd_initrc_t domain.
244
245
246
247 apcupsd_lock_t
248
249 - Set files with the apcupsd_lock_t type, if you want to treat the
250 files as apcupsd lock data, stored under the /var/lock directory
251
252
253 Paths:
254 /var/lock/LCK.., /var/lock/subsys/apcupsd
255
256
257 apcupsd_log_t
258
259 - Set files with the apcupsd_log_t type, if you want to treat the data
260 as apcupsd log data, usually stored under the /var/log directory.
261
262
263 Paths:
264 /var/log/apcupsd.events.*, /var/log/apcupsd.status.*
265
266
267 apcupsd_power_t
268
269 - Set files with the apcupsd_power_t type, if you want to treat the
270 files as apcupsd power data.
271
272
273
274 apcupsd_tmp_t
275
276 - Set files with the apcupsd_tmp_t type, if you want to store apcupsd
277 temporary files in the /tmp directories.
278
279
280
281 apcupsd_unit_file_t
282
283 - Set files with the apcupsd_unit_file_t type, if you want to treat the
284 files as apcupsd unit content.
285
286
287
288 apcupsd_var_run_t
289
290 - Set files with the apcupsd_var_run_t type, if you want to store the
291 apcupsd files under the /run or /var/run directory.
292
293
294
295 Note: File context can be temporarily modified with the chcon command.
296 If you want to permanently change the file context you need to use the
297 semanage fcontext command. This will modify the SELinux labeling data‐
298 base. You will need to use restorecon to apply the labels.
299
300
302 semanage fcontext can also be used to manipulate default file context
303 mappings.
304
305 semanage permissive can also be used to manipulate whether or not a
306 process type is permissive.
307
308 semanage module can also be used to enable/disable/install/remove pol‐
309 icy modules.
310
311 semanage port can also be used to manipulate the port definitions
312
313 semanage boolean can also be used to manipulate the booleans
314
315
316 system-config-selinux is a GUI tool available to customize SELinux pol‐
317 icy settings.
318
319
321 This manual page was auto-generated using sepolicy manpage .
322
323
325 selinux(8), apcupsd(8), semanage(8), restorecon(8), chcon(1), sepol‐
326 icy(8), setsebool(8), apcupsd_cgi_script_selinux(8)
327
328
329
330apcupsd 21-03-26 apcupsd_selinux(8)