Bug 746763

Summary: SELinux is preventing /usr/libexec/accounts-daemon from 'read' accesses on the file /var/log/wtmp.
Product: [Fedora] Fedora Reporter: Dario Castellarin <req1348>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED ERRATA QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl, ntsnpr
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:a1961be121b8fed7f8ae1d43db773cb2d0abb0853a8ab34c4032cd3857ce94ac
Fixed In Version: selinux-policy-3.9.16-48.fc15 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-12-04 02:37:29 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 Dario Castellarin 2011-10-17 17:46:40 UTC
SELinux is preventing /usr/libexec/accounts-daemon from 'read' accesses on the file /var/log/wtmp.

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

If you believe that accounts-daemon should be allowed read access on the wtmp 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:wtmp_t:s0
Target Objects                /var/log/wtmp [ file ]
Source                        accounts-daemon
Source Path                   /usr/libexec/accounts-daemon
Port                          <Sconosciuto>
Host                          (removed)
Source RPM Packages           accountsservice-0.6.14-1.fc15
Target RPM Packages           initscripts-9.30.1-1.fc15
Policy RPM                    selinux-policy-3.9.16-43.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.6-2.fc15.x86_64 #1 SMP
                              Fri Oct 14 00:51:35 UTC 2011 x86_64 x86_64
Alert Count                   60
First Seen                    mar 13 set 2011 11:46:47 CEST
Last Seen                     lun 17 ott 2011 19:43:48 CEST
Local ID                      fcfcbc84-de66-42dd-a5a8-c5d76551f7b3

Raw Audit Messages
type=AVC msg=audit(1318873428.738:75): avc:  denied  { read } for  pid=1414 comm="accounts-daemon" name="wtmp" dev=dm-1 ino=1180001 scontext=system_u:system_r:accountsd_t:s0 tcontext=system_u:object_r:wtmp_t:s0 tclass=file


type=AVC msg=audit(1318873428.738:75): avc:  denied  { open } for  pid=1414 comm="accounts-daemon" name="wtmp" dev=dm-1 ino=1180001 scontext=system_u:system_r:accountsd_t:s0 tcontext=system_u:object_r:wtmp_t:s0 tclass=file


type=SYSCALL msg=audit(1318873428.738:75): arch=x86_64 syscall=open success=yes exit=ENOMEM a0=6ae2a0 a1=80000 a2=6ae2a0 a3=1 items=0 ppid=1 pid=1414 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 tty=(none) ses=4294967295 comm=accounts-daemon exe=/usr/libexec/accounts-daemon subj=system_u:system_r:accountsd_t:s0 key=(null)

Hash: accounts-daemon,accountsd_t,wtmp_t,file,read

audit2allow

#============= accountsd_t ==============
allow accountsd_t wtmp_t:file { read open };

audit2allow -R

#============= accountsd_t ==============
allow accountsd_t wtmp_t:file { read open };

Comment 1 Daniel Walsh 2011-10-17 18:26:47 UTC
This is allowed in F16.

Comment 2 Miroslav Grepl 2011-10-18 06:45:18 UTC
Fixed in selinux-policy-3.9.16-44.fc15

Comment 3 Fedora Update System 2011-11-16 16:19:11 UTC
selinux-policy-3.9.16-48.fc15 has been submitted as an update for Fedora 15.
https://admin.fedoraproject.org/updates/selinux-policy-3.9.16-48.fc15

Comment 4 Fedora Update System 2011-11-17 23:37:32 UTC
Package selinux-policy-3.9.16-48.fc15:
* should fix your issue,
* was pushed to the Fedora 15 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing selinux-policy-3.9.16-48.fc15'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2011-16023/selinux-policy-3.9.16-48.fc15
then log in and leave karma (feedback).

Comment 5 Fedora Update System 2011-12-04 02:37:29 UTC
selinux-policy-3.9.16-48.fc15 has been pushed to the Fedora 15 stable repository.  If problems still persist, please make note of it in this bug report.