Bug 1309317
| Summary: | [SELinux]: seeing avc denied for comm=mailx in rhel7.1 | ||||||
|---|---|---|---|---|---|---|---|
| Product: | Red Hat Enterprise Linux 7 | Reporter: | Prasanth <pprakash> | ||||
| Component: | abrt | Assignee: | abrt <abrt-devel-list> | ||||
| Status: | CLOSED ERRATA | QA Contact: | Martin Kyral <mkyral> | ||||
| Severity: | medium | Docs Contact: | |||||
| Priority: | unspecified | ||||||
| Version: | 7.1 | CC: | akhakhar, annair, jfilak, kkeithle, lvrabec, mgrepl, mhabrnal, mkyral, mmalik, ndevos, ovasik, plautrba, pprakash, pvrabec, rhs-bugs, sankarshan, skoduri, ssekidde | ||||
| Target Milestone: | rc | ||||||
| Target Release: | --- | ||||||
| Hardware: | x86_64 | ||||||
| OS: | Linux | ||||||
| Whiteboard: | |||||||
| Fixed In Version: | abrt-2.1.11-36.el7 | Doc Type: | Bug Fix | ||||
| Doc Text: | Story Points: | --- | |||||
| Clone Of: | 1247522 | ||||||
| : | 1312009 (view as bug list) | Environment: | |||||
| Last Closed: | 2016-11-04 03:08:52 UTC | Type: | Bug | ||||
| Regression: | --- | Mount Type: | --- | ||||
| Documentation: | --- | CRM: | |||||
| Verified Versions: | Category: | --- | |||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||
| Embargoed: | |||||||
| Bug Depends On: | 1247522 | ||||||
| Bug Blocks: | 1312009 | ||||||
| Attachments: |
|
||||||
|
Description
Prasanth
2016-02-17 13:01:03 UTC
Jakub, I thought it should append inherited files in /var/cache/abrt? Every time ABRT detects a new problem or a duplicate problem (problem means a coredump or an uncaught Python exception etc.) a new directory in /var/spool/abrt (formerly /var/tmp/abrt) is created (resp. updates the original problem directory in case of duplicate problems). After the directory is created (or the duplicate problem directory is localized) /usr/sbin/abrtd runs several shell scripts in the problem directory and one of those scripts executes /usr/bin/reporter-mailx which internally uses /usr/bin/mailx. The reporter-mailx binary should send a short email to root as a notification of the detected problem. If no MTA (sendmail, postfix, etc.) is installed on the machine, the mailx binary fails and tries to create the dead.letter file in its working directory which is the problem directory in our case. We can configure libreport to not create the dead.letter file:
diff --git a/src/plugins/reporter-mailx.c b/src/plugins/reporter-mailx.c
index 47943ed..b45ede2 100644
--- a/src/plugins/reporter-mailx.c
+++ b/src/plugins/reporter-mailx.c
@@ -132,6 +132,12 @@ static void create_and_send_email(
*/
putenv((char*)"sendwait=1");
+ /* Prevent mailx to create dead.letter if sending fails. The file is
+ * useless in our case and when the reporter is called from abrtd, SELinux
+ * complains a lot about mailx touching ABRT data.
+ */
+ putenv((char*)"DEAD=/dev/null");
+
if (notify_only)
log(_("Sending a notification email to: %s"), email_to);
else
Upstream pull request: https://github.com/abrt/libreport/pull/416 Created attachment 1148520 [details]
Patch 1/1: mailx: stop creating dead.letter on mailx failures
Related testcase: https://github.com/abrt/abrt/tree/rhel7/tests/runtests/mailx-dead-letter Since the problem described in this bug report should be resolved in a recent advisory, it has been closed with a resolution of ERRATA. For information on the advisory, and where to find the updated files, follow the link below. If the solution does not work for you, open a new bug report. https://rhn.redhat.com/errata/RHBA-2016-2307.html |