Bug 1480930

Summary: SELinux is preventing systemd-logind from 'rmdir' accesses on the directory services.
Product: [Fedora] Fedora Reporter: Joachim Frieben <jfrieben>
Component: selinux-policyAssignee: Lukas Vrabec <lvrabec>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 27CC: dominick.grift, dwalsh, e.nedelec, lsm5, lvrabec, mgrepl, plautrba, ssekidde
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:9b03af5639a7d618bc6674e512379b21e55cfb91c6e9207746183f1ba759fb86;VARIANT_ID=workstation;
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-30 22:36:16 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Joachim Frieben 2017-08-12 23:16:19 UTC
Description of problem:
SELinux is preventing systemd-logind from 'rmdir' accesses on the directory services.

*****  Plugin catchall (100. confidence) suggests   **************************

If you believe that systemd-logind should be allowed rmdir access on the services 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 'systemd-logind' --raw | audit2allow -M my-systemdlogind
# semodule -X 300 -i my-systemdlogind.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                unconfined_u:object_r:session_dbusd_tmp_t:s0
Target Objects                services [ 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-270.fc27.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.13.0-0.rc4.git4.1.fc27.x86_64 #1
                              SMP Fri Aug 11 15:03:46 UTC 2017 x86_64 x86_64
Alert Count                   4
First Seen                    2017-08-12 22:44:46 CEST
Last Seen                     2017-08-13 00:54:40 CEST
Local ID                      276ab68e-d584-4cd7-b157-99c83aa4083c

Raw Audit Messages
type=AVC msg=audit(1502578480.498:467): avc:  denied  { rmdir } for  pid=2909 comm="systemd-logind" name="services" dev="tmpfs" ino=34264 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=unconfined_u:object_r:session_dbusd_tmp_t:s0 tclass=dir permissive=1


Hash: systemd-logind,systemd_logind_t,session_dbusd_tmp_t,dir,rmdir

Version-Release number of selected component:
selinux-policy-3.13.1-270.fc27.noarch

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.1
hashmarkername: setroubleshoot
kernel:         4.13.0-0.rc4.git4.1.fc27.x86_64
type:           libreport

Comment 1 Jan Kurik 2017-08-15 08:54:35 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 27 development cycle.
Changing version to '27'.

Comment 2 Ned 2017-08-30 06:38:01 UTC
I do have this bug with F26 (upgraded from F24>F25>F26), Mate spin :

*****  Plugin catchall (100. confidence) suggests   **************************

If vous pensez que systemd-logind devrait être autorisé à accéder rmdir sur services directory par défaut.
Then vous devriez rapporter ceci en tant qu'anomalie.
Vous pouvez générer un module de stratégie local pour autoriser cet accès.
Do
allow this access for now by executing:
# ausearch -c 'systemd-logind' --raw | audit2allow -M my-systemdlogind
# semodule -X 300 -i my-systemdlogind.pp

Additional Information:
Source Context                system_u:system_r:systemd_logind_t:s0
Target Context                unconfined_u:object_r:session_dbusd_tmp_t:s0
Target Objects                services [ dir ]
Source                        systemd-logind
Source Path                   systemd-logind
Port                          <Inconnu>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.13.1-260.6.fc26.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     NedProBook
Platform                      Linux (removed) 4.12.8-300.fc26.x86_64 #1 SMP Thu
                              Aug 17 15:30:20 UTC 2017 x86_64 x86_64
Alert Count                   3
First Seen                    2017-08-29 08:46:02 CEST
Last Seen                     2017-08-30 08:31:32 CEST
Local ID                      c479e5b7-a1da-4ac1-a1e7-f7b79238ac3d

Raw Audit Messages
type=AVC msg=audit(1504074692.130:220): avc:  denied  { rmdir } for  pid=877 comm="systemd-logind" name="services" dev="tmpfs" ino=28242 scontext=system_u:system_r:systemd_logind_t:s0 tcontext=unconfined_u:object_r:session_dbusd_tmp_t:s0 tclass=dir permissive=1


Hash: systemd-logind,systemd_logind_t,session_dbusd_tmp_t,dir,rmdir

Comment 3 Ben Cotton 2018-11-27 14:35:42 UTC
This message is a reminder that Fedora 27 is nearing its end of life.
On 2018-Nov-30  Fedora will stop maintaining and issuing updates for
Fedora 27. It is Fedora's policy to close all bug reports from releases
that are no longer maintained. At that time this bug will be closed as
EOL if it remains open with a Fedora  'version' of '27'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 27 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

Comment 4 Ben Cotton 2018-11-30 22:36:16 UTC
Fedora 27 changed to end-of-life (EOL) status on 2018-11-30. Fedora 27 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.