Bug 726924 - Sendmail can't read /root/.forward
Summary: Sendmail can't read /root/.forward
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: setroubleshoot-plugins
Version: 15
Hardware: Unspecified
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Miroslav Grepl
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-31 00:47 UTC by pigetak178
Modified: 2011-08-02 14:04 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-08-01 17:50:45 UTC
Type: ---


Attachments (Terms of Use)

Description pigetak178 2011-07-31 00:47:59 UTC
Description of problem:

SELinux is preventing /usr/sbin/sendmail.sendmail from read access on the file .forward.

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

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

Additional Information:
Source Context                system_u:system_r:sendmail_t:s0
Target Context                unconfined_u:object_r:admin_home_t:s0
Target Objects                .forward [ file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          localhost.localdomain
Source RPM Packages           sendmail-8.14.5-1.fc15
Target RPM Packages           
Policy RPM                    selinux-policy-3.9.16-34.fc15
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Host Name                     localhost.localdomain
Platform                      Linux localhost.localdomain
                              2.6.38.8-35.fc15.x86_64 #1 SMP Wed Jul 6 13:58:54
                              UTC 2011 x86_64 x86_64
Alert Count                   2
First Seen                    Sat 30 Jul 2011 07:57:32 PM EDT
Last Seen                     Sat 30 Jul 2011 08:01:03 PM EDT
Local ID                      542915cf-8b62-4b52-82e9-a17366ae7eab

Raw Audit Messages
type=AVC msg=audit(1312070463.958:175): avc:  denied  { read } for  pid=2539 comm="sendmail" name=".forward" dev=dm-1 ino=7088 scontext=system_u:system_r:sendmail_t:s0 tcontext=unconfined_u:object_r:admin_home_t:s0 tclass=file


type=SYSCALL msg=audit(1312070463.958:175): arch=x86_64 syscall=open success=no exit=EACCES a0=7fff88830fb0 a1=0 a2=1b6 a3=0 items=0 ppid=2538 pid=2539 auid=4294967295 uid=0 gid=51 euid=0 suid=0 fsuid=0 egid=51 sgid=51 fsgid=51 tty=(none) ses=4294967295 comm=sendmail exe=/usr/sbin/sendmail.sendmail subj=system_u:system_r:sendmail_t:s0 key=(null)

Hash: sendmail,sendmail_t,admin_home_t,file,read

audit2allow

#============= sendmail_t ==============
allow sendmail_t admin_home_t:file read;

audit2allow -R

#============= sendmail_t ==============
allow sendmail_t admin_home_t:file read;





Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Miroslav Grepl 2011-08-01 12:37:43 UTC
Please, execute

# restorecon -R -v /root/.forward

will fix.

Comment 2 pigetak178 2011-08-02 09:59:09 UTC
That worked. Thanks.

Comment 3 Daniel Walsh 2011-08-02 14:04:19 UTC
BTW in F16 this will happen magically.

# rm -f /root/.forward 
# touch !$
touch /root/.forward
# ls -lZ !$
# ls -lZ /root/.forward
-rw-r--r--. root root staff_u:object_r:mail_home_t:s0  /root/.forward


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