SELinux-Refpolicy Archive on lore.kernel.org
 help / color / Atom feed
* [RFC] Rename *_var_run_t to *_runtime_t
@ 2019-09-14 21:51 Chris PeBenito
  2019-09-15 10:33 ` Nicolas Iooss
  0 siblings, 1 reply; 3+ messages in thread
From: Chris PeBenito @ 2019-09-14 21:51 UTC (permalink / raw)
  To: refpolicy

/var/run has moved to /run on most systems and it's use has increased 
beyond pid files and sockets. Because of this, new types used in /run 
have for some time followed the convention *_runtime_t. This change 
would rename all *_var_run_t types to *_runtime_t.

Since this adds many aliases to the policy, the patch set also drops all 
old backwards-compatibility aliases.

https://github.com/SELinuxProject/refpolicy/pull/106

Any objections to this?

-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Rename *_var_run_t to *_runtime_t
  2019-09-14 21:51 [RFC] Rename *_var_run_t to *_runtime_t Chris PeBenito
@ 2019-09-15 10:33 ` Nicolas Iooss
  2019-09-17  0:52   ` Chris PeBenito
  0 siblings, 1 reply; 3+ messages in thread
From: Nicolas Iooss @ 2019-09-15 10:33 UTC (permalink / raw)
  To: Chris PeBenito; +Cc: refpolicy

On Sat, Sep 14, 2019 at 11:52 PM Chris PeBenito <pebenito@ieee.org> wrote:
>
> /var/run has moved to /run on most systems and it's use has increased
> beyond pid files and sockets. Because of this, new types used in /run
> have for some time followed the convention *_runtime_t. This change
> would rename all *_var_run_t types to *_runtime_t.
>
> Since this adds many aliases to the policy, the patch set also drops all
> old backwards-compatibility aliases.
>
> https://github.com/SELinuxProject/refpolicy/pull/106
>
> Any objections to this?

Hello,
I agree with this change.

When I loaded the policy with your patch on my test system, my kernel
logs issued a warning:

SELinux:  Context sysadm_u:sysadm_r:samba_net_t became invalid (unmapped).
SELinux:  Context sysadm_u:sysadm_r:smbcontrol_t became invalid (unmapped).
SELinux:  Context sysadm_u:sysadm_r:winbind_helper_t became invalid (unmapped).

This is because the following optional block from sysadm.te is now dropped:

optional_policy(`
samba_admin(sysadm_t, sysadm_r)
samba_run_smbcontrol(sysadm_t, sysadm_r)
samba_run_smbmount(sysadm_t, sysadm_r)
samba_run_net(sysadm_t, sysadm_r)
samba_run_winbind_helper(sysadm_t, sysadm_r)
')

This block is dropped because it required two types that are not
defined: nmbd_runtime_t and smbd_runtime_t.

In the current refpolicy (git master), there is:

typealias samba_var_run_t alias { nmbd_var_run_t smbd_var_run_t };

Your pull request changes this to:

typealias samba_runtime_t alias { nmbd_var_run_t smbd_var_run_t };

Should nmbd_runtime_t and smbd_runtime_t be changed to samba_runtime_t
in interface samba_admin()?
Other than that, I did not find other issues.

Thanks,
Nicolas


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [RFC] Rename *_var_run_t to *_runtime_t
  2019-09-15 10:33 ` Nicolas Iooss
@ 2019-09-17  0:52   ` Chris PeBenito
  0 siblings, 0 replies; 3+ messages in thread
From: Chris PeBenito @ 2019-09-17  0:52 UTC (permalink / raw)
  To: Nicolas Iooss; +Cc: refpolicy

On 9/15/19 6:33 AM, Nicolas Iooss wrote:
> On Sat, Sep 14, 2019 at 11:52 PM Chris PeBenito <pebenito@ieee.org> wrote:
>>
>> /var/run has moved to /run on most systems and it's use has increased
>> beyond pid files and sockets. Because of this, new types used in /run
>> have for some time followed the convention *_runtime_t. This change
>> would rename all *_var_run_t types to *_runtime_t.
>>
>> Since this adds many aliases to the policy, the patch set also drops all
>> old backwards-compatibility aliases.
>>
>> https://github.com/SELinuxProject/refpolicy/pull/106
>>
>> Any objections to this?
> 
> Hello,
> I agree with this change.
> 
> When I loaded the policy with your patch on my test system, my kernel
> logs issued a warning:
> 
> SELinux:  Context sysadm_u:sysadm_r:samba_net_t became invalid (unmapped).
> SELinux:  Context sysadm_u:sysadm_r:smbcontrol_t became invalid (unmapped).
> SELinux:  Context sysadm_u:sysadm_r:winbind_helper_t became invalid (unmapped).
> 
> This is because the following optional block from sysadm.te is now dropped:
> 
> optional_policy(`
> samba_admin(sysadm_t, sysadm_r)
> samba_run_smbcontrol(sysadm_t, sysadm_r)
> samba_run_smbmount(sysadm_t, sysadm_r)
> samba_run_net(sysadm_t, sysadm_r)
> samba_run_winbind_helper(sysadm_t, sysadm_r)
> ')
> 
> This block is dropped because it required two types that are not
> defined: nmbd_runtime_t and smbd_runtime_t.
> 
> In the current refpolicy (git master), there is:
> 
> typealias samba_var_run_t alias { nmbd_var_run_t smbd_var_run_t };
> 
> Your pull request changes this to:
> 
> typealias samba_runtime_t alias { nmbd_var_run_t smbd_var_run_t };
> 
> Should nmbd_runtime_t and smbd_runtime_t be changed to samba_runtime_t
> in interface samba_admin()?

Yes. There was another interface that also had that issue.  I updated 
the PR to fix it.


> Other than that, I did not find other issues.
> 
> Thanks,
> Nicolas
> 


-- 
Chris PeBenito

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, back to index

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-09-14 21:51 [RFC] Rename *_var_run_t to *_runtime_t Chris PeBenito
2019-09-15 10:33 ` Nicolas Iooss
2019-09-17  0:52   ` Chris PeBenito

SELinux-Refpolicy Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/selinux-refpolicy/0 selinux-refpolicy/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 selinux-refpolicy selinux-refpolicy/ https://lore.kernel.org/selinux-refpolicy \
		selinux-refpolicy@vger.kernel.org
	public-inbox-index selinux-refpolicy

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.kernel.vger.selinux-refpolicy


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git