1crond_selinux(8) SELinux Policy crond crond_selinux(8)
2
3
4
6 crond_selinux - Security Enhanced Linux Policy for the crond processes
7
9 Security-Enhanced Linux secures the crond processes via flexible manda‐
10 tory access control.
11
12 The crond processes execute with the crond_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 crond_t
19
20
21
23 The crond_t SELinux type can be entered via the crond_exec_t file type.
24
25 The default entrypoint paths for the crond_t domain are the following:
26
27 /usr/sbin/cron(d)?, /usr/sbin/atd, /usr/sbin/fcron, /usr/libexec/fcron
28
30 SELinux defines process types (domains) for each process running on the
31 system
32
33 You can see the context of a process using the -Z option to ps
34
35 Policy governs the access confined processes have to files. SELinux
36 crond policy is very flexible allowing users to setup their crond pro‐
37 cesses in as secure a method as possible.
38
39 The following process types are defined for crond:
40
41 crond_t
42
43 Note: semanage permissive -a crond_t can be used to make the process
44 type crond_t permissive. SELinux does not deny access to permissive
45 process types, but the AVC (SELinux denials) messages are still gener‐
46 ated.
47
48
50 SELinux policy is customizable based on least access required. crond
51 policy is extremely flexible and has several booleans that allow you to
52 manipulate the policy and run crond with the tightest access possible.
53
54
55
56 If you want to determine whether crond can execute jobs in the user do‐
57 main as opposed to the the generic cronjob domain, you must turn on the
58 cron_userdomain_transition boolean. Enabled by default.
59
60 setsebool -P cron_userdomain_transition 1
61
62
63
64 If you want to dontaudit all daemons scheduling requests (setsched,
65 sys_nice), you must turn on the daemons_dontaudit_scheduling boolean.
66 Enabled by default.
67
68 setsebool -P daemons_dontaudit_scheduling 1
69
70
71
72 If you want to deny user domains applications to map a memory region as
73 both executable and writable, this is dangerous and the executable
74 should be reported in bugzilla, you must turn on the deny_execmem bool‐
75 ean. Disabled by default.
76
77 setsebool -P deny_execmem 1
78
79
80
81 If you want to control the ability to mmap a low area of the address
82 space, as configured by /proc/sys/vm/mmap_min_addr, you must turn on
83 the mmap_low_allowed boolean. Disabled by default.
84
85 setsebool -P mmap_low_allowed 1
86
87
88
89 If you want to allow system to run with NIS, you must turn on the
90 nis_enabled boolean. Disabled by default.
91
92 setsebool -P nis_enabled 1
93
94
95
96 If you want to enable polyinstantiated directory support, you must turn
97 on the polyinstantiation_enabled boolean. Disabled by default.
98
99 setsebool -P polyinstantiation_enabled 1
100
101
102
103 If you want to disable kernel module loading, you must turn on the se‐
104 cure_mode_insmod boolean. Disabled by default.
105
106 setsebool -P secure_mode_insmod 1
107
108
109
110 If you want to allow unconfined executables to make their heap memory
111 executable. Doing this is a really bad idea. Probably indicates a
112 badly coded executable, but could indicate an attack. This executable
113 should be reported in bugzilla, you must turn on the selinuxuser_ex‐
114 echeap boolean. Disabled by default.
115
116 setsebool -P selinuxuser_execheap 1
117
118
119
120 If you want to allow unconfined executables to make their stack exe‐
121 cutable. This should never, ever be necessary. Probably indicates a
122 badly coded executable, but could indicate an attack. This executable
123 should be reported in bugzilla, you must turn on the selinuxuser_exec‐
124 stack boolean. Enabled by default.
125
126 setsebool -P selinuxuser_execstack 1
127
128
129
131 The SELinux process type crond_t can manage files labeled with the fol‐
132 lowing file types. The paths listed are the default paths for these
133 file types. Note the processes UID still need to have DAC permissions.
134
135 file_type
136
137 all files on the system
138
139
141 SELinux requires files to have an extended attribute to define the file
142 type.
143
144 You can see the context of a file using the -Z option to ls
145
146 Policy governs the access confined processes have to these files.
147 SELinux crond policy is very flexible allowing users to setup their
148 crond processes in as secure a method as possible.
149
150 STANDARD FILE CONTEXT
151
152 SELinux defines the file context types for the crond, if you wanted to
153 store files with these types in a different paths, you need to execute
154 the semanage command to specify alternate labeling and then use re‐
155 storecon to put the labels on disk.
156
157 semanage fcontext -a -t crond_exec_t '/srv/crond/content(/.*)?'
158 restorecon -R -v /srv/mycrond_content
159
160 Note: SELinux often uses regular expressions to specify labels that
161 match multiple files.
162
163 The following file types are defined for crond:
164
165
166
167 crond_exec_t
168
169 - Set files with the crond_exec_t type, if you want to transition an
170 executable to the crond_t domain.
171
172
173 Paths:
174 /usr/sbin/cron(d)?, /usr/sbin/atd, /usr/sbin/fcron,
175 /usr/libexec/fcron
176
177
178 crond_initrc_exec_t
179
180 - Set files with the crond_initrc_exec_t type, if you want to transi‐
181 tion an executable to the crond_initrc_t domain.
182
183
184
185 crond_tmp_t
186
187 - Set files with the crond_tmp_t type, if you want to store crond tem‐
188 porary files in the /tmp directories.
189
190
191
192 crond_unit_file_t
193
194 - Set files with the crond_unit_file_t type, if you want to treat the
195 files as crond unit content.
196
197
198 Paths:
199 /usr/lib/systemd/system/atd.*, /usr/lib/systemd/system/crond.*
200
201
202 crond_var_run_t
203
204 - Set files with the crond_var_run_t type, if you want to store the
205 crond files under the /run or /var/run directory.
206
207
208 Paths:
209 /var/run/.*cron.*, /var/run/crond?.pid, /var/run/crond?.reboot,
210 /var/run/atd.pid, /var/run/fcron.pid, /var/run/fcron.fifo,
211 /var/run/anacron.pid
212
213
214 Note: File context can be temporarily modified with the chcon command.
215 If you want to permanently change the file context you need to use the
216 semanage fcontext command. This will modify the SELinux labeling data‐
217 base. You will need to use restorecon to apply the labels.
218
219
221 semanage fcontext can also be used to manipulate default file context
222 mappings.
223
224 semanage permissive can also be used to manipulate whether or not a
225 process type is permissive.
226
227 semanage module can also be used to enable/disable/install/remove pol‐
228 icy modules.
229
230 semanage boolean can also be used to manipulate the booleans
231
232
233 system-config-selinux is a GUI tool available to customize SELinux pol‐
234 icy settings.
235
236
238 This manual page was auto-generated using sepolicy manpage .
239
240
242 selinux(8), crond(8), semanage(8), restorecon(8), chcon(1), sepol‐
243 icy(8), setsebool(8)
244
245
246
247crond 23-10-20 crond_selinux(8)