Bug 1661706 - SELinux is preventing accounts-daemon from 'getattr' accesses on the file /var/lib/AccountsService/users/gdm.
Summary: SELinux is preventing accounts-daemon from 'getattr' accesses on the file /va...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: selinux-policy
Version: 31
Hardware: x86_64
OS: Unspecified
low
low
Target Milestone: ---
Assignee: Zdenek Pytela
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:00264b05291cdbc531b32a00617...
: 1661707 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2018-12-22 12:36 UTC by Mikhail
Modified: 2020-02-07 12:52 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-07 12:52:42 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Mikhail 2018-12-22 12:36:06 UTC
Description of problem:
SELinux is preventing accounts-daemon from 'getattr' accesses on the file /var/lib/AccountsService/users/gdm.

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

If you want to fix the label. 
/var/lib/AccountsService/users/gdm default label should be accountsd_var_lib_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 /var/lib/AccountsService/users/gdm

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

If you believe that accounts-daemon should be allowed getattr access on the gdm file 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 'accounts-daemon' --raw | audit2allow -M my-accountsdaemon
# semodule -X 300 -i my-accountsdaemon.pp

Additional Information:
Source Context                system_u:system_r:accountsd_t:s0
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /var/lib/AccountsService/users/gdm [ file ]
Source                        accounts-daemon
Source Path                   accounts-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           
Policy RPM                    selinux-policy-3.14.3-15.fc30.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 4.20.0-0.rc7.git1.1.fc30.x86_64 #1
                              SMP Tue Dec 18 22:52:01 UTC 2018 x86_64 x86_64
Alert Count                   1
First Seen                    2018-12-22 17:34:56 +05
Last Seen                     2018-12-22 17:34:56 +05
Local ID                      5f3f1a17-511c-44b6-834b-1768cd61abea

Raw Audit Messages
type=AVC msg=audit(1545482096.62:529): avc:  denied  { getattr } for  pid=1038 comm="accounts-daemon" path="/var/lib/AccountsService/users/gdm" dev="nvme0n1p2" ino=2883642 scontext=system_u:system_r:accountsd_t:s0 tcontext=system_u:object_r:unlabeled_t:s0 tclass=file permissive=0


Hash: accounts-daemon,accountsd_t,unlabeled_t,file,getattr

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

Additional info:
component:      selinux-policy
reporter:       libreport-2.9.7
hashmarkername: setroubleshoot
kernel:         4.20.0-0.rc7.git1.1.fc30.x86_64
type:           libreport

Comment 1 Lukas Vrabec 2019-01-08 16:01:49 UTC
*** Bug 1661707 has been marked as a duplicate of this bug. ***

Comment 2 Ben Cotton 2019-08-13 16:51:08 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 3 Ben Cotton 2019-08-13 19:25:22 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 4 Zdenek Pytela 2020-02-07 12:52:11 UTC
Hi,

It looks like the file in the setroubleshoot report has invalid label. The unlabeled_t label is usually displayed when a file was created in SELinux disabled state or when its actual label does not currently exist.

You can fix the label with the following command:

  # /sbin/restorecon -v /path/file

or setup the machine to relabel all filesystems on the next reboot:

  # fixfiles onboot

and reboot the system.

Closing as NOTABUG. Feel free to reopen the bugzilla if the issue persists.
Hi,


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