1ntpd_selinux(8)               SELinux Policy ntpd              ntpd_selinux(8)
2
3
4

NAME

6       ntpd_selinux - Security Enhanced Linux Policy for the ntpd processes
7

DESCRIPTION

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

ENTRYPOINTS

23       The  ntpd_t  SELinux  type  can  be  entered  via  the  ntpdate_exec_t,
24       ntpd_exec_t file types.
25
26       The default entrypoint paths for the ntpd_t domain are the following:
27
28       /usr/sbin/sntp,     /usr/sbin/ntpdate,    /usr/libexec/ntpdate-wrapper,
29       /etc/cron.(daily|weekly)/ntp-simple,      /etc/cron.(daily|weekly)/ntp-
30       server, /usr/sbin/ntpd
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       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

BOOLEANS

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 users to resolve user passwd entries directly from
60       ldap rather then using a sssd server, you  must  turn  on  the  authlo‐
61       gin_nsswitch_use_ldap boolean. Disabled by default.
62
63       setsebool -P authlogin_nsswitch_use_ldap 1
64
65
66
67       If you want to allow all daemons to write corefiles to /, you must turn
68       on the daemons_dump_core boolean. Disabled by default.
69
70       setsebool -P daemons_dump_core 1
71
72
73
74       If you want to enable cluster mode for daemons, you must  turn  on  the
75       daemons_enable_cluster_mode boolean. Enabled by default.
76
77       setsebool -P daemons_enable_cluster_mode 1
78
79
80
81       If  you want to allow all daemons to use tcp wrappers, you must turn on
82       the daemons_use_tcp_wrapper boolean. Disabled by default.
83
84       setsebool -P daemons_use_tcp_wrapper 1
85
86
87
88       If you want to allow all daemons the ability to  read/write  terminals,
89       you must turn on the daemons_use_tty boolean. Disabled by default.
90
91       setsebool -P daemons_use_tty 1
92
93
94
95       If  you  want  to deny any process from ptracing or debugging any other
96       processes, you  must  turn  on  the  deny_ptrace  boolean.  Enabled  by
97       default.
98
99       setsebool -P deny_ptrace 1
100
101
102
103       If  you  want  to  allow  any  process  to mmap any file on system with
104       attribute file_type, you must turn on the  domain_can_mmap_files  bool‐
105       ean. Enabled by default.
106
107       setsebool -P domain_can_mmap_files 1
108
109
110
111       If  you want to allow all domains write to kmsg_device, while kernel is
112       executed with systemd.log_target=kmsg parameter, you must turn  on  the
113       domain_can_write_kmsg boolean. Disabled by default.
114
115       setsebool -P domain_can_write_kmsg 1
116
117
118
119       If you want to allow all domains to use other domains file descriptors,
120       you must turn on the domain_fd_use boolean. Enabled by default.
121
122       setsebool -P domain_fd_use 1
123
124
125
126       If you want to allow all domains to have the kernel load  modules,  you
127       must  turn  on  the  domain_kernel_load_modules  boolean.  Disabled  by
128       default.
129
130       setsebool -P domain_kernel_load_modules 1
131
132
133
134       If you want to allow all domains to execute in fips_mode, you must turn
135       on the fips_mode boolean. Enabled by default.
136
137       setsebool -P fips_mode 1
138
139
140
141       If you want to enable reading of urandom for all domains, you must turn
142       on the global_ssp boolean. Disabled by default.
143
144       setsebool -P global_ssp 1
145
146
147
148       If you want to allow confined applications to run  with  kerberos,  you
149       must turn on the kerberos_enabled boolean. Enabled by default.
150
151       setsebool -P kerberos_enabled 1
152
153
154
155       If  you  want  to  allow  system  to run with NIS, you must turn on the
156       nis_enabled boolean. Disabled by default.
157
158       setsebool -P nis_enabled 1
159
160
161
162       If you want to allow confined applications to use nscd  shared  memory,
163       you must turn on the nscd_use_shm boolean. Disabled by default.
164
165       setsebool -P nscd_use_shm 1
166
167
168
169       If  you  want  to  support  NFS  home directories, you must turn on the
170       use_nfs_home_dirs boolean. Disabled by default.
171
172       setsebool -P use_nfs_home_dirs 1
173
174
175
176       If you want to support SAMBA home directories, you  must  turn  on  the
177       use_samba_home_dirs boolean. Disabled by default.
178
179       setsebool -P use_samba_home_dirs 1
180
181
182

PORT TYPES

184       SELinux defines port types to represent TCP and UDP ports.
185
186       You  can  see  the  types associated with a port by using the following
187       command:
188
189       semanage port -l
190
191
192       Policy governs the access  confined  processes  have  to  these  ports.
193       SELinux ntpd policy is very flexible allowing users to setup their ntpd
194       processes in as secure a method as possible.
195
196       The following port types are defined for ntpd:
197
198
199       ntp_port_t
200
201
202
203       Default Defined Ports:
204                 udp 123
205

MANAGED FILES

207       The SELinux process type ntpd_t can manage files labeled with the  fol‐
208       lowing  file  types.   The paths listed are the default paths for these
209       file types.  Note the processes UID still need to have DAC permissions.
210
211       cluster_conf_t
212
213            /etc/cluster(/.*)?
214
215       cluster_var_lib_t
216
217            /var/lib/pcsd(/.*)?
218            /var/lib/cluster(/.*)?
219            /var/lib/openais(/.*)?
220            /var/lib/pengine(/.*)?
221            /var/lib/corosync(/.*)?
222            /usr/lib/heartbeat(/.*)?
223            /var/lib/heartbeat(/.*)?
224            /var/lib/pacemaker(/.*)?
225
226       cluster_var_run_t
227
228            /var/run/crm(/.*)?
229            /var/run/cman_.*
230            /var/run/rsctmp(/.*)?
231            /var/run/aisexec.*
232            /var/run/heartbeat(/.*)?
233            /var/run/corosync-qnetd(/.*)?
234            /var/run/corosync-qdevice(/.*)?
235            /var/run/cpglockd.pid
236            /var/run/corosync.pid
237            /var/run/rgmanager.pid
238            /var/run/cluster/rgmanager.sk
239
240       gpsd_tmpfs_t
241
242
243       ntp_drift_t
244
245            /var/lib/ntp(/.*)?
246            /etc/ntp/data(/.*)?
247            /var/lib/sntp(/.*)?
248            /var/lib/sntp-kod(/.*)?
249
250       ntpd_log_t
251
252            /var/log/ntp.*
253            /var/log/xntpd.*
254            /var/log/ntpstats(/.*)?
255
256       ntpd_tmp_t
257
258
259       ntpd_tmpfs_t
260
261
262       ntpd_var_run_t
263
264            /var/run/ntpd.pid
265
266       root_t
267
268            /sysroot/ostree/deploy/.*-atomic.*/deploy(/.*)?
269            /
270            /initrd
271
272       timemaster_tmpfs_t
273
274
275       tmpfs_t
276
277            /dev/shm
278            /var/run/shm
279            /usr/lib/udev/devices/shm
280
281

FILE CONTEXTS

283       SELinux requires files to have an extended attribute to define the file
284       type.
285
286       You can see the context of a file using the -Z option to ls
287
288       Policy  governs  the  access  confined  processes  have to these files.
289       SELinux ntpd policy is very flexible allowing users to setup their ntpd
290       processes in as secure a method as possible.
291
292       STANDARD FILE CONTEXT
293
294       SELinux  defines  the file context types for the ntpd, if you wanted to
295       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 ntpd_var_run_t '/srv/myntpd_content(/.*)?'
300       restorecon -R -v /srv/myntpd_content
301
302       Note: SELinux often uses regular expressions  to  specify  labels  that
303       match multiple files.
304
305       The following file types are defined for ntpd:
306
307
308
309       ntpd_exec_t
310
311       -  Set  files  with  the ntpd_exec_t type, if you want to transition an
312       executable to the ntpd_t domain.
313
314
315       Paths:
316            /etc/cron.(daily|weekly)/ntp-simple, /etc/cron.(daily|weekly)/ntp-
317            server, /usr/sbin/ntpd
318
319
320       ntpd_initrc_exec_t
321
322       - Set files with the ntpd_initrc_exec_t type, if you want to transition
323       an executable to the ntpd_initrc_t domain.
324
325
326
327       ntpd_key_t
328
329       - Set files with the ntpd_key_t type, if you want to treat the files as
330       ntpd key data.
331
332
333       Paths:
334            /etc/ntp/crypto(/.*)?, /etc/ntp/keys
335
336
337       ntpd_log_t
338
339       -  Set files with the ntpd_log_t type, if you want to treat the data as
340       ntpd log data, usually stored under the /var/log directory.
341
342
343       Paths:
344            /var/log/ntp.*, /var/log/xntpd.*, /var/log/ntpstats(/.*)?
345
346
347       ntpd_tmp_t
348
349       - Set files with the ntpd_tmp_t type, if you want to store ntpd  tempo‐
350       rary files in the /tmp directories.
351
352
353
354       ntpd_tmpfs_t
355
356       - Set files with the ntpd_tmpfs_t type, if you want to store ntpd files
357       on a tmpfs file system.
358
359
360
361       ntpd_unit_file_t
362
363       - Set files with the ntpd_unit_file_t type, if you want  to  treat  the
364       files as ntpd unit content.
365
366
367
368       ntpd_var_run_t
369
370       - Set files with the ntpd_var_run_t type, if you want to store the ntpd
371       files under the /run or /var/run directory.
372
373
374
375       ntpdate_exec_t
376
377       - Set files with the ntpdate_exec_t type, if you want to transition  an
378       executable to the ntpdate_t domain.
379
380
381       Paths:
382            /usr/sbin/sntp, /usr/sbin/ntpdate, /usr/libexec/ntpdate-wrapper
383
384
385       Note:  File context can be temporarily modified with the chcon command.
386       If you want to permanently change the file context you need to use  the
387       semanage fcontext command.  This will modify the SELinux labeling data‐
388       base.  You will need to use restorecon to apply the labels.
389
390

COMMANDS

392       semanage fcontext can also be used to manipulate default  file  context
393       mappings.
394
395       semanage  permissive  can  also  be used to manipulate whether or not a
396       process type is permissive.
397
398       semanage module can also be used to enable/disable/install/remove  pol‐
399       icy modules.
400
401       semanage port can also be used to manipulate the port definitions
402
403       semanage boolean can also be used to manipulate the booleans
404
405
406       system-config-selinux is a GUI tool available to customize SELinux pol‐
407       icy settings.
408
409

AUTHOR

411       This manual page was auto-generated using sepolicy manpage .
412
413

SEE ALSO

415       selinux(8), ntpd(8), semanage(8), restorecon(8), chcon(1),  sepolicy(8)
416       , setsebool(8)
417
418
419
420ntpd                               19-04-25                    ntpd_selinux(8)
Impressum