Bug 981671 - SELinux is preventing /usr/libexec/postfix/pickup from 'getattr' accesses on the file /etc/postfix/main.cf.
SELinux is preventing /usr/libexec/postfix/pickup from 'getattr' accesses on ...
Status: CLOSED NOTABUG
Product: Fedora
Classification: Fedora
Component: selinux-policy (Show other bugs)
18
x86_64 Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Miroslav Grepl
Fedora Extras Quality Assurance
abrt_hash:e76e40e0621607c53abe8245c41...
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-05 08:51 EDT by George Sicherman
Modified: 2013-07-12 04:10 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-12 04:10:43 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description George Sicherman 2013-07-05 08:51:52 EDT
Description of problem:
When my system booted, it started postfix.  The SELinux complaints started coming immediately.
SELinux is preventing /usr/libexec/postfix/pickup from 'getattr' accesses on the file /etc/postfix/main.cf.

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

If you want to fix the label. 
/etc/postfix/main.cf default label should be postfix_etc_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /etc/postfix/main.cf

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

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

Additional Information:
Source Context                system_u:system_r:postfix_pickup_t:s0
Target Context                system_u:object_r:etc_aliases_t:s0
Target Objects                /etc/postfix/main.cf [ file ]
Source                        pickup
Source Path                   /usr/libexec/postfix/pickup
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           postfix-2.9.6-5.fc18.x86_64
Target RPM Packages           postfix-2.9.6-5.fc18.x86_64
Policy RPM                    selinux-policy-3.11.1-97.fc18.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.6-200.fc18.x86_64 #1 SMP Thu
                              Jun 13 18:56:55 UTC 2013 x86_64 x86_64
Alert Count                   686
First Seen                    2013-07-04 21:12:35 EDT
Last Seen                     2013-07-05 08:49:21 EDT
Local ID                      cc8fe3d7-212f-4dd3-ae5c-6ec4225d95b9

Raw Audit Messages
type=AVC msg=audit(1373028561.142:1878): avc:  denied  { getattr } for  pid=2616 comm="pickup" path="/etc/postfix/main.cf" dev="dm-1" ino=426338 scontext=system_u:system_r:postfix_pickup_t:s0 tcontext=system_u:object_r:etc_aliases_t:s0 tclass=file


type=SYSCALL msg=audit(1373028561.142:1878): arch=x86_64 syscall=fstat success=no exit=EACCES a0=8 a1=7fffe8b487a0 a2=7fffe8b487a0 a3=74 items=0 ppid=1115 pid=2616 auid=4294967295 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=0 sgid=0 fsgid=0 ses=4294967295 tty=(none) comm=pickup exe=/usr/libexec/postfix/pickup subj=system_u:system_r:postfix_pickup_t:s0 key=(null)

Hash: pickup,postfix_pickup_t,etc_aliases_t,file,getattr

audit2allow

#============= postfix_pickup_t ==============
allow postfix_pickup_t etc_aliases_t:file getattr;

audit2allow -R
require {
	type postfix_pickup_t;
}

#============= postfix_pickup_t ==============
mta_read_aliases(postfix_pickup_t)


Additional info:
reporter:       libreport-2.1.5
hashmarkername: setroubleshoot
kernel:         3.9.6-200.fc18.x86_64
type:           libreport
Comment 1 Miroslav Grepl 2013-07-12 04:10:43 EDT
Please execute

# restorecon -Rv /etc/postfix/

and re-open the bug if you see it again. Thank you.

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