Bug 747104

Summary: SELinux is preventing /usr/libexec/nmh/rcvtty from 'read' accesses on the file utmp.
Product: [Fedora] Fedora Reporter: Doug Maxey <dwm>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 15CC: dominick.grift, dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:f70e99347d7f78994f845fff8fb30a28e3dd060f00a88b18324557ed769aac1c
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-08-07 17:20:45 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Doug Maxey 2011-10-18 20:11:30 UTC
SELinux is preventing /usr/libexec/nmh/rcvtty from 'read' accesses on the file utmp.

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

If you believe that rcvtty should be allowed read access on the utmp 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 rcvtty /var/log/audit/audit.log | audit2allow -M mypol
# semodule -i mypol.pp

Additional Information:
Source Context                system_u:system_r:procmail_t:s0
Target Context                system_u:object_r:initrc_var_run_t:s0
Target Objects                utmp [ file ]
Source                        rcvtty
Source Path                   /usr/libexec/nmh/rcvtty
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           nmh-1.3-4.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-39.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 2.6.40.6-0.fc15.x86_64 #1 SMP Tue
                              Oct 4 00:39:50 UTC 2011 x86_64 x86_64
Alert Count                   3
First Seen                    Tue 11 Oct 2011 11:20:10 PM CDT
Last Seen                     Wed 12 Oct 2011 12:15:56 AM CDT
Local ID                      13c28b7e-5e9f-4516-8234-093b8ce06ade

Raw Audit Messages
type=AVC msg=audit(1318396556.905:1142): avc:  denied  { read } for  pid=29254 comm="rcvtty" name="utmp" dev=tmpfs ino=13531 scontext=system_u:system_r:procmail_t:s0 tcontext=system_u:object_r:initrc_var_run_t:s0 tclass=file


type=SYSCALL msg=audit(1318396556.905:1142): arch=x86_64 syscall=open success=no exit=EACCES a0=383855b927 a1=80000 a2=383855b927 a3=6 items=0 ppid=29250 pid=29254 auid=4294967295 uid=500 gid=500 euid=500 suid=500 fsuid=500 egid=500 sgid=500 fsgid=500 tty=(none) ses=4294967295 comm=rcvtty exe=/usr/libexec/nmh/rcvtty subj=system_u:system_r:procmail_t:s0 key=(null)

Hash: rcvtty,procmail_t,initrc_var_run_t,file,read

audit2allow

#============= procmail_t ==============
allow procmail_t initrc_var_run_t:file read;

audit2allow -R

#============= procmail_t ==============
allow procmail_t initrc_var_run_t:file read;

Comment 1 Daniel Walsh 2011-10-20 14:59:18 UTC
Did you setup procmail to execute /usr/libexec/nmh/rcvtty?

Comment 2 Doug Maxey 2011-10-24 20:22:15 UTC
(In reply to comment #1)
> Did you setup procmail to execute /usr/libexec/nmh/rcvtty?

Yes.  It's an uncommon folder, so there are few messages.

Comment 3 Daniel Walsh 2011-10-31 15:59:46 UTC
Well you can add these rules for now, using 

# grep procmail /var/log/audit/audit.log | audit2allow -M myprocmail
# semodule -i myprocmail.pp

Comment 4 Fedora End Of Life 2012-08-07 17:20:47 UTC
This message is a notice that Fedora 15 is now at end of life. Fedora
has stopped maintaining and issuing updates for Fedora 15. It is
Fedora's policy to close all bug reports from releases that are no
longer maintained. At this time, all open bugs with a Fedora 'version'
of '15' have been closed as WONTFIX.

(Please note: Our normal process is to give advanced warning of this
occurring, but we forgot to do that. A thousand apologies.)

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

Bug Reporter: Thank you for reporting this issue and we are sorry that
we were unable to fix it before Fedora 15 reached 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 to click on
"Clone This Bug" (top right of this page) and open it against that
version of Fedora.

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.

The process we are following is described here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping