# $Revision: 1.5 $ $Date: 2019-06-26 01:37:39-04 $
# $UUID: 242565cb-9cef-4160-91fe-4f4a87f844f0 $
#
# /usr/sbin/ntpd needs:
#   - add_name access to directory /etc/ntp/daemon/
#   - write access to directory /etc/ntp/daemon/

module ntpd-drift 1.5;

require {
    type ntpd_t;
    type etc_t;
    class dir { add_name write };
    class file create;
}

#============= ntpd_t ==============
#!!!! The source type 'ntpd_t' can write to a 'dir' of the following types:
#  ntpd_log_t, ntpd_tmp_t, tmpfs_t, tmp_t, ntp_drift_t, ntpd_tmpfs_t,
#  var_log_t, var_run_t, ntpd_var_run_t, root_t, cluster_conf_t,
#  cluster_var_lib_t, cluster_var_run_t
#

allow ntpd_t etc_t:dir { add_name write };
allow ntpd_t etc_t:file create;
