Bug 970346

Summary: SELinux is preventing /usr/sbin/sendmail.sendmail from 'read' accesses on the directory /home/sayak/Downloads.
Product: [Fedora] Fedora Reporter: Sayak Sarkar <sayak.bugsmith>
Component: sendmailAssignee: Jaroslav Škarvada <jskarvad>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: dominick.grift, dwalsh, jskarvad, mgrepl, rudolfs.mazurs, sayak.bugsmith
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:4c00ac85c511e679718334009880fad08c53efe2bcfe89d97bd1e86895f3790d
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-12-05 14:46:33 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:
Attachments:
Description Flags
Yum log. none

Description Sayak Sarkar 2013-06-03 22:43:30 UTC
Description of problem:
SELinux is preventing /usr/sbin/sendmail.sendmail from 'read' accesses on the directory /home/sayak/Downloads.

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

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

Additional Information:
Source Context                unconfined_u:system_r:system_mail_t:s0-s0:c0.c1023
Target Context                unconfined_u:object_r:user_home_t:s0
Target Objects                /home/sayak/Downloads [ dir ]
Source                        newaliases
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.7-1.fc19.x86_64
Target RPM Packages           
Policy RPM                    selinux-policy-3.12.1-44.fc19.noarch selinux-
                              policy-3.12.1-47.fc19.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     (removed)
Platform                      Linux (removed) 3.9.2-301.fc19.x86_64 #1 SMP Mon
                              May 13 12:36:24 UTC 2013 x86_64 x86_64
Alert Count                   1
First Seen                    2013-06-04 04:11:15 IST
Last Seen                     2013-06-04 04:11:15 IST
Local ID                      ad3f8044-b80d-4cc7-85bf-cb0a9891560c

Raw Audit Messages
type=AVC msg=audit(1370299275.420:488): avc:  denied  { read } for  pid=10534 comm="newaliases" path="/home/sayak/Downloads" dev="dm-2" ino=524302 scontext=unconfined_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir


type=AVC msg=audit(1370299275.420:488): avc:  denied  { read } for  pid=10534 comm="newaliases" path="/home/sayak/Downloads" dev="dm-2" ino=524302 scontext=unconfined_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=unconfined_u:object_r:user_home_t:s0 tclass=dir


type=SYSCALL msg=audit(1370299275.420:488): arch=x86_64 syscall=execve success=yes exit=0 a0=1987d70 a1=1987230 a2=1986050 a3=7fff0f4e63f0 items=0 ppid=10533 pid=10534 auid=1000 uid=0 gid=0 euid=0 suid=0 fsuid=0 egid=51 sgid=51 fsgid=51 ses=1 tty=pts0 comm=newaliases exe=/usr/sbin/sendmail.sendmail subj=unconfined_u:system_r:system_mail_t:s0-s0:c0.c1023 key=(null)

Hash: newaliases,system_mail_t,user_home_t,dir,read

Additional info:
reporter:       libreport-2.1.4
hashmarkername: setroubleshoot
kernel:         3.9.2-301.fc19.x86_64
type:           libreport

Potential duplicate: bug 785501

Comment 1 Miroslav Grepl 2013-06-04 14:54:36 UTC
Are you mailing content of ~/Downloads?

Comment 2 Sayak Sarkar 2013-06-04 20:03:53 UTC
I was simply trying to access a file which I had just downloaded. The file didn't open and the bug reporter utility opened up. Not sure why it says sendmail, though. 
Retried opening the file after the bug report was complete, and it opened as expected in LibreOffice.

Comment 3 Daniel Walsh 2013-06-07 20:43:58 UTC
This is a leaked file descriptor to newaliases?

Which was running as root.  Were you running firefox as root?

Comment 4 Sayak Sarkar 2013-06-08 19:56:26 UTC
(In reply to Daniel Walsh from comment #3)
> This is a leaked file descriptor to newaliases?
> 
> Which was running as root.  Were you running firefox as root?

No, I wasn't. Though I remember setting the default user account as an administrative one during installation.

Comment 5 Daniel Walsh 2013-06-15 11:54:16 UTC
Well this really has nothing to do with sendmail, since something else is leaking to it.  The problem is figuring out what?

Comment 6 Rūdolfs Mazurs 2013-06-25 07:13:47 UTC
Noticed on my fedora 19 install, when updating the latest beta. Didn't have FF or any other app except terminal open.

Comment 7 Jaroslav Škarvada 2013-06-25 08:55:00 UTC
Interesting, which method did you use for the update? The 'yum update' from the terminal? Could you provide the log of the update, i.e. the appropriate snip from the /var/log/yum.log? It would allow me to see which packages were in the transaction. Which desktop and terminal did you use?

Comment 8 Rūdolfs Mazurs 2013-06-25 09:54:46 UTC
Created attachment 765004 [details]
Yum log.

/var/log/yum.log file.

Comment 9 Rūdolfs Mazurs 2013-06-25 09:55:51 UTC
I updated with yum update in gnome terminal. The desktop environment is gnome.

Comment 10 Daniel Walsh 2013-06-27 19:50:30 UTC
Were you sitting in your Downloads directory? sudo yum update?

Comment 11 Jaroslav Škarvada 2013-12-05 14:46:33 UTC
By the deeper analysis it seems to be dupe of bug 919801.

*** This bug has been marked as a duplicate of bug 919801 ***