Bug 1119766 - SELinux is preventing accounts-daemon from 'getattr' accesses on the file /etc/passwd.
Summary: SELinux is preventing accounts-daemon from 'getattr' accesses on the file /et...
Keywords:
Status: CLOSED RAWHIDE
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:416090ac85f115a4fdbc34d2e8d...
: 1118986 1119768 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-07-15 13:10 UTC by Alexander Kurtakov
Modified: 2019-08-20 15:52 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-07-15 22:39:58 UTC


Attachments (Terms of Use)

Description Alexander Kurtakov 2014-07-15 13:10:38 UTC
Description of problem:
SELinux is preventing accounts-daemon from 'getattr' accesses on the file /etc/passwd.

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

If you want to fix the label. 
/etc/passwd default label should be passwd_file_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /etc/passwd

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

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

Additional Information:
Source Context                system_u:system_r:accountsd_t:s0
Target Context                system_u:object_r:tmpfs_t:s0
Target Objects                /etc/passwd [ file ]
Source                        accounts-daemon
Source Path                   accounts-daemon
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           
Target RPM Packages           setup-2.9.0-2.fc21.noarch
Policy RPM                    selinux-policy-3.13.1-63.fc21.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 3.16.0-0.rc4.git3.1.fc22.x86_64 #1
                              SMP Fri Jul 11 17:08:34 UTC 2014 x86_64 x86_64
Alert Count                   13
First Seen                    2014-07-15 15:32:31 EEST
Last Seen                     2014-07-15 16:09:18 EEST
Local ID                      d8528d5e-b71e-473e-949b-9f30308e0426

Raw Audit Messages
type=AVC msg=audit(1405429758.250:516): avc:  denied  { getattr } for  pid=624 comm="accounts-daemon" path="/etc/passwd" dev="dm-0" ino=131589 scontext=system_u:system_r:accountsd_t:s0 tcontext=system_u:object_r:tmpfs_t:s0 tclass=file permissive=1


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

Version-Release number of selected component:
selinux-policy-3.13.1-63.fc21.noarch

Additional info:
reporter:       libreport-2.2.3
hashmarkername: setroubleshoot
kernel:         3.16.0-0.rc4.git3.1.fc22.x86_64
type:           libreport

Comment 1 Daniel Walsh 2014-07-15 22:39:58 UTC
Seems like your system is mislabled.  THere was a Rawhide/F21 bug that could have cuased this.

touch /.autorelabel; reboot

Should fix the problem

Comment 2 Daniel Walsh 2014-07-15 22:40:26 UTC
*** Bug 1119768 has been marked as a duplicate of this bug. ***

Comment 3 Miroslav Grepl 2014-07-16 07:54:26 UTC
This is caused by a systemd bug which should be fixed.

Comment 4 Miroslav Grepl 2014-07-16 07:54:36 UTC
*** Bug 1118986 has been marked as a duplicate of this bug. ***

Comment 5 Vít Ondruch 2014-07-16 08:00:35 UTC
(In reply to Miroslav Grepl from comment #3)
> This is caused by a systemd bug which should be fixed.

Out of curiosity, could you please give us some reference to this bug? Thanks.

Comment 6 Vít Ondruch 2019-08-13 13:31:36 UTC
Description of problem:
I was running mock:

~~~
$ rpm -q mock
mock-1.4.17-1.fc31.noarch
~~~

Version-Release number of selected component:
selinux-policy-3.14.4-29.fc31.noarch

Additional info:
reporter:       libreport-2.10.1
hashmarkername: setroubleshoot
kernel:         5.2.8-200.fc30.x86_64
type:           libreport


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