1ntpd_selinux(8) SELinux Policy ntpd ntpd_selinux(8)
2
3
4
6 ntpd_selinux - Security Enhanced Linux Policy for the ntpd processes
7
9 Security-Enhanced Linux secures the ntpd processes via flexible manda‐
10 tory access control.
11
12 The ntpd processes execute with the ntpd_t SELinux type. You can check
13 if you have these processes running by executing the ps command with
14 the -Z qualifier.
15
16 For example:
17
18 ps -eZ | grep ntpd_t
19
20
21
23 The ntpd_t SELinux type can be entered via the ntpd_exec_t, ntp‐
24 date_exec_t file types.
25
26 The default entrypoint paths for the ntpd_t domain are the following:
27
28 /etc/cron.(daily|weekly)/ntp-server, /etc/cron.(daily|weekly)/ntp-sim‐
29 ple, /usr/sbin/ntpd, /usr/sbin/sntp, /usr/sbin/ntpdate,
30 /usr/libexec/ntpdate-wrapper
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 ntpd policy is very flexible allowing users to setup their ntpd pro‐
40 cesses in as secure a method as possible.
41
42 The following process types are defined for ntpd:
43
44 ntpd_t
45
46 Note: semanage permissive -a ntpd_t can be used to make the process
47 type ntpd_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. ntpd
54 policy is extremely flexible and has several booleans that allow you to
55 manipulate the policy and run ntpd with the tightest access possible.
56
57
58
59 If you want to allow all domains to execute in fips_mode, you must turn
60 on the fips_mode boolean. Enabled by default.
61
62 setsebool -P fips_mode 1
63
64
65
66 If you want to support NFS home directories, you must turn on the
67 use_nfs_home_dirs boolean. Enabled by default.
68
69 setsebool -P use_nfs_home_dirs 1
70
71
72
73 If you want to support SAMBA home directories, you must turn on the
74 use_samba_home_dirs boolean. Disabled by default.
75
76 setsebool -P use_samba_home_dirs 1
77
78
79
81 SELinux defines port types to represent TCP and UDP ports.
82
83 You can see the types associated with a port by using the following
84 command:
85
86 semanage port -l
87
88
89 Policy governs the access confined processes have to these ports.
90 SELinux ntpd policy is very flexible allowing users to setup their ntpd
91 processes in as secure a method as possible.
92
93 The following port types are defined for ntpd:
94
95
96 ntp_port_t
97
98
99
100 Default Defined Ports:
101 udp 123
102
104 The SELinux process type ntpd_t can manage files labeled with the fol‐
105 lowing file types. The paths listed are the default paths for these
106 file types. Note the processes UID still need to have DAC permissions.
107
108 cluster_conf_t
109
110 /etc/cluster(/.*)?
111
112 cluster_var_lib_t
113
114 /var/lib/pcsd(/.*)?
115 /var/lib/cluster(/.*)?
116 /var/lib/openais(/.*)?
117 /var/lib/pengine(/.*)?
118 /var/lib/corosync(/.*)?
119 /usr/lib/heartbeat(/.*)?
120 /var/lib/heartbeat(/.*)?
121 /var/lib/pacemaker(/.*)?
122
123 cluster_var_run_t
124
125 /var/run/crm(/.*)?
126 /var/run/cman_.*
127 /var/run/rsctmp(/.*)?
128 /var/run/aisexec.*
129 /var/run/heartbeat(/.*)?
130 /var/run/corosync-qnetd(/.*)?
131 /var/run/corosync-qdevice(/.*)?
132 /var/run/corosync.pid
133 /var/run/cpglockd.pid
134 /var/run/rgmanager.pid
135 /var/run/cluster/rgmanager.sk
136
137 gpsd_tmpfs_t
138
139
140 ntp_drift_t
141
142 /var/lib/ntp(/.*)?
143 /etc/ntp/data(/.*)?
144 /var/lib/sntp(/.*)?
145 /var/lib/sntp-kod(/.*)?
146
147 ntpd_log_t
148
149 /var/log/ntp.*
150 /var/log/xntpd.*
151 /var/log/ntpstats(/.*)?
152
153 ntpd_tmpfs_t
154
155
156 ntpd_var_run_t
157
158 /var/run/ntpd.pid
159
160 root_t
161
162 /sysroot/ostree/deploy/.*-atomic/deploy(/.*)?
163 /
164 /initrd
165
166 timemaster_tmpfs_t
167
168
169 tmpfs_t
170
171 /dev/shm
172 /var/run/shm
173 /usr/lib/udev/devices/shm
174
175
177 SELinux requires files to have an extended attribute to define the file
178 type.
179
180 You can see the context of a file using the -Z option to ls
181
182 Policy governs the access confined processes have to these files.
183 SELinux ntpd policy is very flexible allowing users to setup their ntpd
184 processes in as secure a method as possible.
185
186 STANDARD FILE CONTEXT
187
188 SELinux defines the file context types for the ntpd, if you wanted to
189 store files with these types in a diffent paths, you need to execute
190 the semanage command to sepecify alternate labeling and then use
191 restorecon to put the labels on disk.
192
193 semanage fcontext -a -t ntpd_var_run_t '/srv/myntpd_content(/.*)?'
194 restorecon -R -v /srv/myntpd_content
195
196 Note: SELinux often uses regular expressions to specify labels that
197 match multiple files.
198
199 The following file types are defined for ntpd:
200
201
202
203 ntpd_exec_t
204
205 - Set files with the ntpd_exec_t type, if you want to transition an
206 executable to the ntpd_t domain.
207
208
209 Paths:
210 /etc/cron.(daily|weekly)/ntp-server, /etc/cron.(daily|weekly)/ntp-
211 simple, /usr/sbin/ntpd
212
213
214 ntpd_initrc_exec_t
215
216 - Set files with the ntpd_initrc_exec_t type, if you want to transition
217 an executable to the ntpd_initrc_t domain.
218
219
220
221 ntpd_key_t
222
223 - Set files with the ntpd_key_t type, if you want to treat the files as
224 ntpd key data.
225
226
227 Paths:
228 /etc/ntp/crypto(/.*)?, /etc/ntp/keys
229
230
231 ntpd_log_t
232
233 - Set files with the ntpd_log_t type, if you want to treat the data as
234 ntpd log data, usually stored under the /var/log directory.
235
236
237 Paths:
238 /var/log/ntp.*, /var/log/xntpd.*, /var/log/ntpstats(/.*)?
239
240
241 ntpd_tmp_t
242
243 - Set files with the ntpd_tmp_t type, if you want to store ntpd tempo‐
244 rary files in the /tmp directories.
245
246
247
248 ntpd_tmpfs_t
249
250 - Set files with the ntpd_tmpfs_t type, if you want to store ntpd files
251 on a tmpfs file system.
252
253
254
255 ntpd_unit_file_t
256
257 - Set files with the ntpd_unit_file_t type, if you want to treat the
258 files as ntpd unit content.
259
260
261
262 ntpd_var_run_t
263
264 - Set files with the ntpd_var_run_t type, if you want to store the ntpd
265 files under the /run or /var/run directory.
266
267
268
269 ntpdate_exec_t
270
271 - Set files with the ntpdate_exec_t type, if you want to transition an
272 executable to the ntpdate_t domain.
273
274
275 Paths:
276 /usr/sbin/sntp, /usr/sbin/ntpdate, /usr/libexec/ntpdate-wrapper
277
278
279 Note: File context can be temporarily modified with the chcon command.
280 If you want to permanently change the file context you need to use the
281 semanage fcontext command. This will modify the SELinux labeling data‐
282 base. You will need to use restorecon to apply the labels.
283
284
286 semanage fcontext can also be used to manipulate default file context
287 mappings.
288
289 semanage permissive can also be used to manipulate whether or not a
290 process type is permissive.
291
292 semanage module can also be used to enable/disable/install/remove pol‐
293 icy modules.
294
295 semanage port can also be used to manipulate the port definitions
296
297 semanage boolean can also be used to manipulate the booleans
298
299
300 system-config-selinux is a GUI tool available to customize SELinux pol‐
301 icy settings.
302
303
305 This manual page was auto-generated using sepolicy manpage .
306
307
309 selinux(8), ntpd(8), semanage(8), restorecon(8), chcon(1), sepolicy(8),
310 setsebool(8)
311
312
313
314ntpd 20-05-05 ntpd_selinux(8)