Bug 543874

Summary: SELinux is preventing sendmail (sendmail_t) "write" to /1 (devpts_t).
Product: [Fedora] Fedora Reporter: jeffgbaker
Component: selinux-policyAssignee: Daniel Walsh <dwalsh>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: low    
Version: 12CC: dwalsh, mgrepl
Target Milestone: ---   
Target Release: ---   
Hardware: i386   
OS: Linux   
Whiteboard: setroubleshoot_trace_hash:ed8ba5a644a7ef2363e449a8ff73af905b830c62d56aa3d59bb29581985ce3aa
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-12-03 13:26:55 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 jeffgbaker 2009-12-03 11:55:22 UTC
Summary:

SELinux is preventing sendmail (sendmail_t) "write" to /1 (devpts_t).

Detailed Description:

SELinux denied access requested by sendmail. /1 may be a mislabeled. /1 default
SELinux type is default_t, but its current type is devpts_t. Changing this file
back to the default type, may fix your problem.

File contexts can be assigned to a file in the following ways.

  * Files created in a directory receive the file context of the parent
    directory by default.
  * The SELinux policy might override the default label inherited from the
    parent directory by specifying a process running in context A which creates
    a file in a directory labeled B will instead create the file with label C.
    An example of this would be the dhcp client running with the dhclient_t type
    and creates a file in the directory /etc. This file would normally receive
    the etc_t type due to parental inheritance but instead the file is labeled
    with the net_conf_t type because the SELinux policy specifies this.
  * Users can change the file context on a file using tools such as chcon, or
    restorecon.

This file could have been mislabeled either by user error, or if an normally
confined application was run under the wrong domain.

However, this might also indicate a bug in SELinux because the file should not
have been labeled with this type.

If you believe this is a bug, please file a bug report
(http://bugzilla.redhat.com/bugzilla/enter_bug.cgi) against this package.

Allowing Access:

You can restore the default system context to this file by executing the
restorecon command. restorecon '/1', if this file is a directory, you can
recursively restore using restorecon -R '/1'.

Fix Command:

restorecon '/1'

Additional Information:

Source Context                system_u:system_r:sendmail_t:s0
Target Context                system_u:object_r:devpts_t:s0
Target Objects                /1 [ chr_file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.14.3-5.fc11
Target RPM Packages           
Policy RPM                    selinux-policy-3.6.12-88.fc11
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Enforcing
Plugin Name                   restorecon
Host Name                     (removed)
Platform                      Linux jeff.house.net 2.6.30.9-96.fc11.i686.PAE #1
                              SMP Tue Nov 3 23:41:33 EST 2009 i686 i686
Alert Count                   12
First Seen                    Sun 08 Nov 2009 04:10:32 PM EST
Last Seen                     Sun 29 Nov 2009 04:58:45 PM EST
Local ID                      3da26c1e-1df3-488c-9a69-e1d9c866620e
Line Numbers                  

Raw Audit Messages            

node=jeff.house.net type=AVC msg=audit(1259531925.983:9): avc:  denied  { write } for  pid=1833 comm="sendmail" path="/1" dev=devpts ino=4 scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:devpts_t:s0 tclass=chr_file

node=jeff.house.net type=SYSCALL msg=audit(1259531925.983:9): arch=40000003 syscall=4 success=no exit=-13 a0=1 a1=13f7ef8 a2=3c a3=3c items=0 ppid=1832 pid=1833 auid=4294967295 uid=0 gid=0 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 String generated from  selinux-policy-3.6.12-88.fc11,restorecon,sendmail,sendmail_t,devpts_t,chr_file,write
audit2allow suggests:

#============= sendmail_t ==============
allow sendmail_t devpts_t:chr_file write;

Comment 1 Miroslav Grepl 2009-12-03 13:26:55 UTC

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