Description of problem: Upgraded from Fedora 37 to Fedoara 38 and sendmail now failes to start with this SELinux Alert. SELinux is preventing sendmail from 'create' accesses on the file sendmail.pid. ***** Plugin catchall (100. confidence) suggests ************************** If you believe that sendmail should be allowed create access on the sendmail.pid 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: # ausearch -c 'sendmail' --raw | audit2allow -M my-sendmail # semodule -X 300 -i my-sendmail.pp Additional Information: Source Context system_u:system_r:sendmail_t:s0 Target Context system_u:object_r:sendmail_var_run_t:s0 Target Objects sendmail.pid [ file ] Source sendmail Source Path sendmail Port <Unknown> Host (removed) Source RPM Packages Target RPM Packages SELinux Policy RPM selinux-policy-targeted-38.17-1.fc38.noarch Local Policy RPM selinux-policy-targeted-38.17-1.fc38.noarch Selinux Enabled True Policy Type targeted Enforcing Mode Enforcing Host Name (removed) Platform Linux (removed) 6.3.8-200.fc38.x86_64 #1 SMP PREEMPT_DYNAMIC Thu Jun 15 02:15:40 UTC 2023 x86_64 Alert Count 4 First Seen 2023-06-22 17:36:50 PDT Last Seen 2023-06-22 17:40:15 PDT Local ID a307e526-14b1-46b5-bc6a-9b2983870948 Raw Audit Messages type=AVC msg=audit(1687480815.586:277): avc: denied { create } for pid=11664 comm="sendmail" name="sendmail.pid" scontext=system_u:system_r:sendmail_t:s0 tcontext=system_u:object_r:sendmail_var_run_t:s0 tclass=file permissive=0 Hash: sendmail,sendmail_t,sendmail_var_run_t,file,create Version-Release number of selected component: selinux-policy-targeted-38.17-1.fc38.noarch Additional info: reporter: libreport-2.17.10 component: selinux-policy comment: Upgraded from Fedora 37 to Fedoara 38 and sendmail now failes to start with this SELinux Alert. type: libreport package: selinux-policy-targeted-38.17-1.fc38.noarch hashmarkername: setroubleshoot reason: SELinux is preventing sendmail from 'create' accesses on the file sendmail.pid. kernel: 6.3.8-200.fc38.x86_64 component: selinux-policy
Created attachment 1972175 [details] File: description
Created attachment 1972176 [details] File: os_info
I downgraded selinux-policy and selinux-policy-targeted to 38.8-2 on my system as a workaround to get sendmail running again. I can confirm that the issue with sendmail was not present in selinux-policy 38.15-1, but that wasn't easily available for downgrade, so I just went back to 38.8-2 because that was easier.
This was the module created after two or three iterations of search & allow: ---- cut here ---- cut here ---- module my-sendmail 1.0; require { type sendmail_var_run_t; type sendmail_t; class file { create getattr lock open unlink write }; } #============= sendmail_t ============== #!!!! This avc is allowed in the current policy allow sendmail_t sendmail_var_run_t:file { create getattr lock open unlink write }; ---- cut here ---- cut here ---- Apparently, "sendmail" requires "create", "getattr", etc. for files in /var/run (meaning /run). Hope this helps, bye, pg
Confirming that downgrading selinux-policy-targeted-38.17-1.fc38 to selinux-policy-targeted-38.15-1.fc38 fixed this for me.
*** This bug has been marked as a duplicate of bug 2216060 ***