Bug 1328246

Summary: Missing SELinux rule for management socket file
Product: Red Hat Enterprise Linux 7 Reporter: Mauricio Teixeira <mteixeira>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.0CC: gwync, huzaifas, lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde, steve
Target Milestone: rc   
Target Release: 7.2   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: selinux-policy-3.13.1-84.el7 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-11-04 02:26:48 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Mauricio Teixeira 2016-04-18 20:13:51 UTC
OpenVPN allows one to use socket files for the management interface instead of TCP ports. This is important in servers where non-admin users are also allowed to SSH in, because limits their access to the management interface.

Example directive:
management /var/run/openvpn/management-tcp unix
management-client-user root

However there is no SELinux rule in RHEL7 that allows creation of such socket file, so I had to create one by my own:

***
module ovpn 1.0;

require {
  type openvpn_t;
  type openvpn_var_run_t;
  class sock_file { create read write unlink };
}

#============= openvpn_t ==============
allow openvpn_t openvpn_var_run_t:sock_file { create read write unlink };
***

I wonder if it would be possible to integrate this into the package shipped in the EPEL repo.

Comment 1 Gwyn Ciesla 2016-06-24 18:16:24 UTC
This should go in selinux-policy, reassigning.

Comment 8 errata-xmlrpc 2016-11-04 02:26:48 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://rhn.redhat.com/errata/RHBA-2016-2283.html