Bug 1309897 - SELinux is preventing systemd-logind from 'mounton' accesses on the directory /run/user/1000.
Summary: SELinux is preventing systemd-logind from 'mounton' accesses on the directory...
Keywords:
Status: CLOSED DUPLICATE of bug 1308771
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:c2e38423acf3863d4bdfb7102c7...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-02-18 22:27 UTC by Joachim Frieben
Modified: 2016-02-19 10:36 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-02-19 10:36:34 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Joachim Frieben 2016-02-18 22:27:39 UTC
Description of problem:
SELinux is preventing systemd-logind from 'mounton' accesses on the directory /run/user/1000.

*****  Plugin restorecon (94.8 confidence) suggests   ************************

If you want to fix the label. 
/run/user/1000 default label should be user_tmp_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /run/user/1000

*****  Plugin catchall_labels (5.21 confidence) suggests   *******************

If you want to allow systemd-logind to have mounton access on the 1000 directory
Then you need to change the label on /run/user/1000
Do
# semanage fcontext -a -t FILE_TYPE '/run/user/1000'
where FILE_TYPE is one of the following: abrt_var_cache_t, gkeyringd_tmp_t, mozilla_plugin_tmp_t, mozilla_plugin_tmpfs_t, user_tmp_t. 
Then execute: 
restorecon -v '/run/user/1000'


*****  Plugin catchall (1.44 confidence) suggests   **************************

If you believe that systemd-logind should be allowed mounton access on the 1000 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:
# grep systemd-logind /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                system_u:object_r:default_t:s0
Target Objects                /run/user/1000 [ dir ]
Source                        systemd-logind
Source Path                   systemd-logind
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-171.fc24.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.5.0-0.rc4.git1.2.fc24.x86_64 #1
                              SMP Wed Feb 17 16:11:54 UTC 2016 x86_64 x86_64
Alert Count                   5
First Seen                    2016-02-18 22:06:50 CET
Last Seen                     2016-02-18 23:21:36 CET
Local ID                      361af844-28d4-49dd-9d7b-13b300a9271d

Raw Audit Messages
type=AVC msg=audit(1455834096.406:277): avc:  denied  { mounton } for  pid=750 comm="systemd-logind" path="/run/user/1000" dev="tmpfs" ino=22477 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=system_u:object_r:default_t:s0 tclass=dir permissive=1


Hash: systemd-logind,systemd_logind_t,default_t,dir,mounton

Version-Release number of selected component:
selinux-policy-3.13.1-171.fc24.noarch

Additional info:
reporter:       libreport-2.6.4
hashmarkername: setroubleshoot
kernel:         4.5.0-0.rc4.git1.2.fc24.x86_64
type:           libreport

Comment 1 Joachim Frieben 2016-02-19 08:26:11 UTC
Issue is absent after fully relabeling the file system. However, after a fresh network install from the Fedora development tree in a virtual machine like in this case, this should not be necessary - an anaconda issue? Maybe a full relabeling should be triggered by anaconda after install.

Comment 2 Miroslav Grepl 2016-02-19 10:36:34 UTC

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


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