Bug 1705474 - SELinux is preventing (vnstatd) from 'mounton' accesses on the directory /run/systemd/unit-root/var/lib/vnstat.
Summary: SELinux is preventing (vnstatd) from 'mounton' accesses on the directory /run...
Keywords:
Status: CLOSED DUPLICATE of bug 1648864
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 30
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukas Vrabec
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:be2798cce8a0430045b1e55e5c4...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-05-02 11:24 UTC by sedrubal
Modified: 2019-05-02 11:48 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-05-02 11:48:01 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description sedrubal 2019-05-02 11:24:27 UTC
Description of problem:
Since Fedora 30 vnstat.service (which is also called vnstatd.service), does not start anymore as long as SELinux is in Enforcing mode.
SELinux is preventing (vnstatd) from 'mounton' accesses on the directory /run/systemd/unit-root/var/lib/vnstat.

*****  Plugin restorecon (99.5 confidence) suggests   ************************

If you want to fix the label. 
/run/systemd/unit-root/var/lib/vnstat default label should be init_var_run_t.
Then you can run restorecon. The access attempt may have been stopped due to insufficient permissions to access a parent directory in which case try to change the following command accordingly.
Do
# /sbin/restorecon -v /run/systemd/unit-root/var/lib/vnstat

*****  Plugin catchall (1.49 confidence) suggests   **************************

If you believe that (vnstatd) should be allowed mounton access on the vnstat directory by default.
Then you should report this as a bug.
You can generate a local policy module to allow this access.
Do
allow this access for now by executing:
# ausearch -c '(vnstatd)' --raw | audit2allow -M my-vnstatd
# semodule -X 300 -i my-vnstatd.pp

Additional Information:
Source Context                system_u:system_r:init_t:s0
Target Context                system_u:object_r:vnstatd_var_lib_t:s0
Target Objects                /run/systemd/unit-root/var/lib/vnstat [ dir ]
Source                        (vnstatd)
Source Path                   (vnstatd)
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.3-32.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 5.0.9-301.fc30.x86_64 #1 SMP Tue
                              Apr 23 23:57:35 UTC 2019 x86_64 x86_64
Alert Count                   6
First Seen                    2019-04-30 11:53:28 CEST
Last Seen                     2019-05-02 13:22:01 CEST
Local ID                      3190fdee-ed88-429a-9c7e-c396bc47fbd0

Raw Audit Messages
type=AVC msg=audit(1556796121.121:4682): avc:  denied  { mounton } for  pid=11043 comm="(vnstatd)" path="/run/systemd/unit-root/var/lib/vnstat" dev="dm-0" ino=17204605 scontext=system_u:system_r:init_t:s0 tcontext=system_u:object_r:vnstatd_var_lib_t:s0 tclass=dir permissive=1


Hash: (vnstatd),init_t,vnstatd_var_lib_t,dir,mounton

Version-Release number of selected component:
selinux-policy-3.14.3-32.fc30.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.10.0
hashmarkername: setroubleshoot
kernel:         5.0.9-301.fc30.x86_64
type:           libreport

Potential duplicate: bug 1648864

Comment 1 Lukas Vrabec 2019-05-02 11:48:01 UTC

*** This bug has been marked as a duplicate of bug 1648864 ***


Note You need to log in before you can comment on or make changes to this bug.