Bug 1297343

Summary: SELinux is preventing /usr/sbin/sendmail.sendmail from 'read' accesses on the lnk_file /usr/lib64/libcrypt.so.1.
Product: [Fedora] Fedora Reporter: edo <edosurina>
Component: selinux-policyAssignee: Miroslav Grepl <mgrepl>
Status: CLOSED DUPLICATE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 23CC: dominick.grift, dwalsh, lvrabec, mgrepl, plautrba
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Unspecified   
Whiteboard: abrt_hash:edae5163ab69f1b7211cb00ec2b4da9684002b31723639bee0a900ddbb992d5e;VARIANT_ID=workstation;
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-01-11 13:41:01 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 edo 2016-01-11 09:47:21 UTC
Description of problem:
SELinux is preventing /usr/sbin/sendmail.sendmail from 'read' accesses on the lnk_file /usr/lib64/libcrypt.so.1.

*****  Plugin restorecon (94.8 confidence) suggests   ************************

If you want to fix the label. 
/usr/lib64/libcrypt.so.1 default label should be lib_t.
Then you can run restorecon.
Do
# /sbin/restorecon -v /usr/lib64/libcrypt.so.1

*****  Plugin catchall_labels (5.21 confidence) suggests   *******************

If you want to allow sendmail.sendmail to have read access on the libcrypt.so.1 lnk_file
Then you need to change the label on /usr/lib64/libcrypt.so.1
Do
# semanage fcontext -a -t FILE_TYPE '/usr/lib64/libcrypt.so.1'
where FILE_TYPE is one of the following: admin_home_t, bin_t, boot_t, cert_t, cvs_data_t, device_t, devlog_t, etc_aliases_t, etc_runtime_t, etc_t, file_context_t, fonts_cache_t, fonts_t, home_root_t, ld_so_t, lib_t, locale_t, mail_home_rw_t, mail_spool_t, man_cache_t, man_t, mqueue_spool_t, net_conf_t, postfix_etc_t, proc_t, root_t, rpm_script_tmp_t, security_t, sendmail_exec_t, shell_exec_t, src_t, sssd_var_lib_t, sysfs_t, system_conf_t, system_db_t, textrel_shlib_t, tmp_t, usr_t, uucpd_spool_t, var_run_t, var_t. 
Then execute: 
restorecon -v '/usr/lib64/libcrypt.so.1'


*****  Plugin catchall (1.44 confidence) suggests   **************************

If you believe that sendmail.sendmail should be allowed read access on the libcrypt.so.1 lnk_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:system_mail_t:s0-s0:c0.c1023
Target Context                system_u:object_r:unlabeled_t:s0
Target Objects                /usr/lib64/libcrypt.so.1 [ lnk_file ]
Source                        sendmail
Source Path                   /usr/sbin/sendmail.sendmail
Port                          <Unknown>
Host                          (removed)
Source RPM Packages           sendmail-8.15.2-2.fc23.x86_64
Target RPM Packages           glibc-2.22-7.fc23.x86_64
Policy RPM                    selinux-policy-3.13.1-158.fc23.noarch
Selinux Enabled               True
Policy Type                   targeted
Enforcing Mode                Permissive
Host Name                     (removed)
Platform                      Linux (removed) 4.3.3-300.fc23.x86_64 #1 SMP Tue
                              Jan 5 23:31:01 UTC 2016 x86_64 x86_64
Alert Count                   2
First Seen                    2016-01-10 17:55:44 CET
Last Seen                     2016-01-11 10:43:41 CET
Local ID                      2079b3b3-ae3c-4e90-a67d-11f1492e9a36

Raw Audit Messages
type=AVC msg=audit(1452505421.367:1291): avc:  denied  { read } for  pid=25922 comm="sendmail" name="libcrypt.so.1" dev="dm-1" ino=3193829 scontext=system_u:system_r:system_mail_t:s0-s0:c0.c1023 tcontext=system_u:object_r:unlabeled_t:s0 tclass=lnk_file permissive=1


type=SYSCALL msg=audit(1452505421.367:1291): arch=x86_64 syscall=open success=yes exit=ESRCH a0=7f93d03aae58 a1=80000 a2=7f93d03e1148 a3=7f93d03d6e48 items=0 ppid=1 pid=25922 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:system_mail_t:s0-s0:c0.c1023 key=(null)

Hash: sendmail,system_mail_t,unlabeled_t,lnk_file,read

Version-Release number of selected component:
selinux-policy-3.13.1-158.fc23.noarch

Additional info:
reporter:       libreport-2.6.3
hashmarkername: setroubleshoot
kernel:         4.3.3-300.fc23.x86_64
type:           libreport

Comment 1 Daniel Walsh 2016-01-11 13:41:01 UTC

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