Closed fuero closed 4 years ago
Since we don't handle any centos/rhel packaging for mumble how would we go about using this contribution? Are such policies something platform independent we could with our (source) releases? Are they platform specific and are only useful to the specific distro maintainers?
I put it here because the suggestion in the CentOS installation instruction on the wiki to simply disable SELinux bugs me.
AFAIK the policy is distribution specific, but should cover all RHEL clones (CentOS, Scientific Linux, Fedora, etc.) As RHEL(/CentOS/...) is pretty much the only Linux variant I know of that ships with SELinux enabled, it's the only one that matters in this regard.
Might the wiki be the place to put this then?
The hardest part about shipping it in Mumble itself would be that murmur_port_t would need to be dynamic to support virtual servers properly... I am not well-versed enough in SELinux to know if that's even possible...
Just packaging it as a reference would be useful, even if its not enabled
In reply to fuero's last comment:
Fedora also packages murmur - but the default Fedora SELinux policy doesn't cover murmur - i.e. murmur then runs unconfined.
Although, it is confined by some systemd security mechanisms (that are orthogonal to SELinux):
PrivateDevices=true
PrivateTmp=true
ProtectSystem=full
ProtectHome=true
(cf. /usr/lib/systemd/system/murmur.service
)
Thus, perhaps this could also be a better approach for running murmur on CentOS/RHEL - i.e. change the recommendation in the mumble wiki to something like: don't disable SELinux but run murmur unconfined plus systemd-style security (if available in the systemd versions CentOS/RHEL 7 uses).
I guess if you want to secure murmur with SELinux the most promising way is to get the murmur SELinux policy integrated upstream, i.e. in Fedora. In a second step one could then 'backport' the Fedora murmur package via EPEL to CentOS/RHEL.
@mkrautz, with SELinux the ports are usually dynamically mapped. That means that a type like - say - ssh_port_t
or murmur_port_t
is just a place-holder for a concrete port mapping. Thus, you can change that port-mapping at runtime without having to change/re-compile/re-load the policy file - cf. semanage-port(8).
The port mapping can include one or many ports, i.e. it is a list of ports/port-ranges.
Here's an SELinux policy to start with:
Install static murmurd to
/opt/murmur
. Install packagesselinux-policy-devel
,setools-console
, andpolicycoreutils-python
:Place the files
murmur.fc
andmurmur.te
below in a directory and change into it.Compile and install the module:
murmur.fc
murmur.te
To refine this policy (see http://danwalsh.livejournal.com/32430.html) use