1logrotate_selinux(8)       SELinux Policy logrotate       logrotate_selinux(8)
2
3
4

NAME

6       logrotate_selinux  -  Security  Enhanced Linux Policy for the logrotate
7       processes
8

DESCRIPTION

10       Security-Enhanced Linux secures the logrotate  processes  via  flexible
11       mandatory access control.
12
13       The  logrotate processes execute with the logrotate_t SELinux type. You
14       can check if you have these processes running by executing the ps  com‐
15       mand with the -Z qualifier.
16
17       For example:
18
19       ps -eZ | grep logrotate_t
20
21
22

ENTRYPOINTS

24       The  logrotate_t  SELinux  type can be entered via the logrotate_exec_t
25       file type.
26
27       The default entrypoint paths for the logrotate_t domain are the follow‐
28       ing:
29
30       /etc/cron.(daily|weekly)/sysklogd, /usr/sbin/logrotate
31

PROCESS TYPES

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       logrotate  policy is very flexible allowing users to setup their logro‐
40       tate processes in as secure a method as possible.
41
42       The following process types are defined for logrotate:
43
44       logrotate_t, logrotate_mail_t
45
46       Note: semanage permissive -a  logrotate_t  can  be  used  to  make  the
47       process  type  logrotate_t  permissive. SELinux does not deny access to
48       permissive process types, but the AVC (SELinux  denials)  messages  are
49       still generated.
50
51

BOOLEANS

53       SELinux  policy is customizable based on least access required.  logro‐
54       tate policy is extremely flexible and has several booleans  that  allow
55       you to manipulate the policy and run logrotate with the tightest access
56       possible.
57
58
59
60       If you want to allow logrotate to read logs inside, you  must  turn  on
61       the logrotate_read_inside_containers boolean. Disabled by default.
62
63       setsebool -P logrotate_read_inside_containers 1
64
65
66
67       If  you  want  to allow logrotate domain to manage fuse files, you must
68       turn on the logrotate_use_fusefs boolean. Disabled by default.
69
70       setsebool -P logrotate_use_fusefs 1
71
72
73
74       If you want to allow logrotate to manage nfs files, you  must  turn  on
75       the logrotate_use_nfs boolean. Disabled by default.
76
77       setsebool -P logrotate_use_nfs 1
78
79
80
81       If you want to allow users to resolve user passwd entries directly from
82       ldap rather then using a sssd server, you  must  turn  on  the  authlo‐
83       gin_nsswitch_use_ldap boolean. Disabled by default.
84
85       setsebool -P authlogin_nsswitch_use_ldap 1
86
87
88
89       If you want to allow all domains to execute in fips_mode, you must turn
90       on the fips_mode boolean. Enabled by default.
91
92       setsebool -P fips_mode 1
93
94
95
96       If you want to allow confined applications to run  with  kerberos,  you
97       must turn on the kerberos_enabled boolean. Disabled by default.
98
99       setsebool -P kerberos_enabled 1
100
101
102
103       If  you  want  to  allow  system  to run with NIS, you must turn on the
104       nis_enabled boolean. Disabled by default.
105
106       setsebool -P nis_enabled 1
107
108
109
110       If you want to allow confined applications to use nscd  shared  memory,
111       you must turn on the nscd_use_shm boolean. Disabled by default.
112
113       setsebool -P nscd_use_shm 1
114
115
116
117       If  you  want  to  support  NFS  home directories, you must turn on the
118       use_nfs_home_dirs boolean. Enabled by default.
119
120       setsebool -P use_nfs_home_dirs 1
121
122
123
124       If you want to support SAMBA home directories, you  must  turn  on  the
125       use_samba_home_dirs boolean. Disabled by default.
126
127       setsebool -P use_samba_home_dirs 1
128
129
130

MANAGED FILES

132       The  SELinux process type logrotate_t can manage files labeled with the
133       following file types.  The paths listed are the default paths for these
134       file types.  Note the processes UID still need to have DAC permissions.
135
136       abrt_var_cache_t
137
138            /var/tmp/abrt(/.*)?
139            /var/cache/abrt(/.*)?
140            /var/spool/abrt(/.*)?
141            /var/spool/debug(/.*)?
142            /var/cache/abrt-di(/.*)?
143            /var/spool/rhsm/debug(/.*)?
144
145       acct_data_t
146
147            /var/account(/.*)?
148            /var/log/account(/.*)?
149
150       chronyd_var_run_t
151
152            /var/run/chrony(/.*)?
153            /var/run/chronyd(/.*)?
154            /var/run/chrony-helper(/.*)?
155            /var/run/chronyd.pid
156            /var/run/chronyd.sock
157
158       cluster_conf_t
159
160            /etc/cluster(/.*)?
161
162       cluster_var_lib_t
163
164            /var/lib/pcsd(/.*)?
165            /var/lib/cluster(/.*)?
166            /var/lib/openais(/.*)?
167            /var/lib/pengine(/.*)?
168            /var/lib/corosync(/.*)?
169            /usr/lib/heartbeat(/.*)?
170            /var/lib/heartbeat(/.*)?
171            /var/lib/pacemaker(/.*)?
172
173       cluster_var_run_t
174
175            /var/run/crm(/.*)?
176            /var/run/cman_.*
177            /var/run/rsctmp(/.*)?
178            /var/run/aisexec.*
179            /var/run/heartbeat(/.*)?
180            /var/run/corosync-qnetd(/.*)?
181            /var/run/corosync-qdevice(/.*)?
182            /var/run/corosync.pid
183            /var/run/cpglockd.pid
184            /var/run/rgmanager.pid
185            /var/run/cluster/rgmanager.sk
186
187       collectd_rw_content_t
188
189
190       faillog_t
191
192            /var/log/btmp.*
193            /var/log/faillog.*
194            /var/log/tallylog.*
195            /var/run/faillock(/.*)?
196
197       fusefs_t
198
199            /var/run/user/[^/]*/gvfs
200
201       logfile
202
203            all log files
204
205       logrotate_lock_t
206
207
208       logrotate_tmp_t
209
210
211       logrotate_var_lib_t
212
213            /var/lib/logrotate(/.*)?
214            /var/lib/logrotate.status.*
215
216       mailman_log_t
217
218            /var/log/mailman.*
219
220       named_cache_t
221
222            /var/named/data(/.*)?
223            /var/lib/softhsm(/.*)?
224            /var/lib/unbound(/.*)?
225            /var/named/slaves(/.*)?
226            /var/named/dynamic(/.*)?
227            /var/named/chroot/var/tmp(/.*)?
228            /var/named/chroot/var/named/data(/.*)?
229            /var/named/chroot/var/named/slaves(/.*)?
230            /var/named/chroot/var/named/dynamic(/.*)?
231
232       nfs_t
233
234
235       openshift_var_lib_t
236
237            /var/lib/openshift(/.*)?
238            /var/lib/stickshift(/.*)?
239            /var/lib/containers/home(/.*)?
240
241       root_t
242
243            /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
244            /
245            /initrd
246
247       systemd_passwd_var_run_t
248
249            /var/run/systemd/ask-password(/.*)?
250            /var/run/systemd/ask-password-block(/.*)?
251
252       var_spool_t
253
254            /var/spool(/.*)?
255
256       varnishlog_log_t
257
258            /var/log/varnish(/.*)?
259
260       virt_cache_t
261
262            /var/cache/oz(/.*)?
263            /var/cache/libvirt(/.*)?
264
265       wtmp_t
266
267            /var/log/wtmp.*
268
269

FILE CONTEXTS

271       SELinux requires files to have an extended attribute to define the file
272       type.
273
274       You can see the context of a file using the -Z option to ls
275
276       Policy governs the access  confined  processes  have  to  these  files.
277       SELinux logrotate policy is very flexible allowing users to setup their
278       logrotate processes in as secure a method as possible.
279
280       EQUIVALENCE DIRECTORIES
281
282
283       logrotate policy stores data with multiple different file context types
284       under the /var/lib/logrotate directory.  If you would like to store the
285       data in a different directory you can use the semanage command to  cre‐
286       ate an equivalence mapping.  If you wanted to store this data under the
287       /srv dirctory you would execute the following command:
288
289       semanage fcontext -a -e /var/lib/logrotate /srv/logrotate
290       restorecon -R -v /srv/logrotate
291
292       STANDARD FILE CONTEXT
293
294       SELinux defines the file context types for the logrotate, if you wanted
295       to store files with these types in a diffent paths, you need to execute
296       the semanage command  to  sepecify  alternate  labeling  and  then  use
297       restorecon to put the labels on disk.
298
299       semanage  fcontext  -a  -t  logrotate_mail_tmp_t '/srv/mylogrotate_con‐
300       tent(/.*)?'
301       restorecon -R -v /srv/mylogrotate_content
302
303       Note: SELinux often uses regular expressions  to  specify  labels  that
304       match multiple files.
305
306       The following file types are defined for logrotate:
307
308
309
310       logrotate_exec_t
311
312       -  Set  files with the logrotate_exec_t type, if you want to transition
313       an executable to the logrotate_t domain.
314
315
316       Paths:
317            /etc/cron.(daily|weekly)/sysklogd, /usr/sbin/logrotate
318
319
320       logrotate_lock_t
321
322       - Set files with the logrotate_lock_t type, if you want  to  treat  the
323       files as logrotate lock data, stored under the /var/lock directory
324
325
326
327       logrotate_mail_tmp_t
328
329       -  Set  files  with the logrotate_mail_tmp_t type, if you want to store
330       logrotate mail temporary files in the /tmp directories.
331
332
333
334       logrotate_tmp_t
335
336       - Set files with the logrotate_tmp_t type, if you want to store  logro‐
337       tate temporary files in the /tmp directories.
338
339
340
341       logrotate_var_lib_t
342
343       - Set files with the logrotate_var_lib_t type, if you want to store the
344       logrotate files under the /var/lib directory.
345
346
347       Paths:
348            /var/lib/logrotate(/.*)?, /var/lib/logrotate.status.*
349
350
351       Note: File context can be temporarily modified with the chcon  command.
352       If  you want to permanently change the file context you need to use the
353       semanage fcontext command.  This will modify the SELinux labeling data‐
354       base.  You will need to use restorecon to apply the labels.
355
356

COMMANDS

358       semanage  fcontext  can also be used to manipulate default file context
359       mappings.
360
361       semanage permissive can also be used to manipulate  whether  or  not  a
362       process type is permissive.
363
364       semanage  module can also be used to enable/disable/install/remove pol‐
365       icy modules.
366
367       semanage boolean can also be used to manipulate the booleans
368
369
370       system-config-selinux is a GUI tool available to customize SELinux pol‐
371       icy settings.
372
373

AUTHOR

375       This manual page was auto-generated using sepolicy manpage .
376
377

SEE ALSO

379       selinux(8),  logrotate(8), semanage(8), restorecon(8), chcon(1), sepol‐
380       icy(8),      setsebool(8),      logrotate_mail_selinux(8),       logro‐
381       tate_mail_selinux(8)
382
383
384
385logrotate                          19-12-02               logrotate_selinux(8)
Impressum