Skip to contentSkip to conversation

ntp policy

DISCUSSION Christopher J. PeBenito 2 participants 4 messages Sep 5, 2005 – Sep 7, 2005 SELinux security module

lore
Share & tools
lore
#0 lore raw

While converting the ntpd policy over to a reference policy module, I came across a few lines which bring up questions.

	# so the start script can change firewall entries
	allow initrc_t net_conf_t:file { getattr read ioctl };

This looks like a distro-specific access, or perhaps it just made its way in by accident?

	# for cron jobs
	# system_crond_t is not right, cron is not doing what it should
	ifdef(`crond.te', `
	system_crond_entry(ntpd_exec_t, ntpd_t)
	')

It is unclear to me what the comment means. Also, shouldn't this be ntpdate_exec_t instead of ntpd_exec_t?

can_udp_send(ntpd_t, sysadm_t)
can_udp_send(sysadm_t, ntpd_t)

There is no comment for these. Are they needed for sysadm to run ntpdate?

	ifdef(`winbind.te', `
	allow ntpd_t winbind_var_run_t:dir r_dir_perms;
	allow ntpd_t winbind_var_run_t:sock_file rw_file_perms;
	')

Generally when using a sock_file, a domain is connecting/sending to another domain over a unix domain socket; however, after doing a few rule searches in apol, I find no evidence that ntpd_t connects/sends to winbind_t. Is there some other purpose for these rules, or am I missing something?

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#1 lore raw
Quoted 10 lines · Christopher J. PeBenito

While converting the ntpd policy over to a reference policy module, I came across a few lines which bring up questions.

	# so the start script can change firewall entries
	allow initrc_t net_conf_t:file { getattr read ioctl };

This looks like a distro-specific access, or perhaps it just made its way in by accident?

No idea. You get these from the can_network call anyways.

Quoted 10 lines
	# for cron jobs
	# system_crond_t is not right, cron is not doing what it should
	ifdef(`crond.te', `
	system_crond_entry(ntpd_exec_t, ntpd_t)
	')

It is unclear to me what the comment means. Also, shouldn't this be ntpdate_exec_t instead of ntpd_exec_t?

Yes, I am sure this rule went in before there was an ntpdate_exec_t, although I do not see a cron job that runs it.

Quoted 12 lines

can_udp_send(ntpd_t, sysadm_t)
can_udp_send(sysadm_t, ntpd_t)

There is no comment for these. Are they needed for sysadm to run ntpdate?

	ifdef(`winbind.te', `
	allow ntpd_t winbind_var_run_t:dir r_dir_perms;
	allow ntpd_t winbind_var_run_t:sock_file rw_file_perms;
	')
Quoted 8 lines

Generally when using a sock_file, a domain is connecting/sending to another domain over a unix domain socket; however, after doing a few rule searches in apol, I find no evidence that ntpd_t connects/sends to winbind_t. Is there some other purpose for these rules, or am I missing something?

Must be from nscd.

Signature · 4 lines
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#2 lore raw
Quoted 4 lines · Daniel J Walsh
Quoted 2 lines · Christopher J. PeBenito

While converting the ntpd policy over to a reference policy module, I came across a few lines which bring up questions.

[cut]

Quoted 5 lines
Quoted 5 lines
	ifdef(`winbind.te', `
	allow ntpd_t winbind_var_run_t:dir r_dir_perms;
	allow ntpd_t winbind_var_run_t:sock_file rw_file_perms;
	')
Quoted 7 lines
Quoted 6 lines

Generally when using a sock_file, a domain is connecting/sending to another domain over a unix domain socket; however, after doing a few rule searches in apol, I find no evidence that ntpd_t connects/sends to winbind_t. Is there some other purpose for these rules, or am I missing something?

Must be from nscd.

I don't understand. If that is the case, wouldn't it be nscd_var_run_t instead of winbind_var_run_t?

Signature · 9 lines
Chris PeBenito
Tresys Technology, LLC
(410) 290-1411 x150


--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.
#3 lore raw
Quoted 27 lines · Christopher J. PeBenito
Quoted 8 lines · Daniel J Walsh
Quoted 4 lines · Christopher J. PeBenito

While converting the ntpd policy over to a reference policy module, I came across a few lines which bring up questions.

[cut]

Quoted 13 lines
Quoted 13 lines
	ifdef(`winbind.te', `
	allow ntpd_t winbind_var_run_t:dir r_dir_perms;
	allow ntpd_t winbind_var_run_t:sock_file rw_file_perms;
	')

Generally when using a sock_file, a domain is connecting/sending to another domain over a unix domain socket; however, after doing a few rule searches in apol, I find no evidence that ntpd_t connects/sends to winbind_t. Is there some other purpose for these rules, or am I missing something?

Quoted 9 lines
Quoted 3 lines

Must be from nscd.

I don't understand. If that is the case, wouldn't it be nscd_var_run_t instead of winbind_var_run_t?

I believe that in permissive mode, you would eventually get to the point of talking over the winbind socket. So these rules were porbably added for this purpose. Since ntpd is in nscd_client_domain, these rules are probably not necessary.

Signature · 4 lines
--
This message was distributed to subscribers of the selinux mailing list.
If you no longer wish to subscribe, send mail to [email protected] with
the words "unsubscribe selinux" without quotes as the message.