RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 922135 - SELinux is preventing nagios_t to make changes within /var/spool/nagios/checkresults/ directory
Summary: SELinux is preventing nagios_t to make changes within /var/spool/nagios/check...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: selinux-policy
Version: 6.4
Hardware: All
OS: Linux
unspecified
unspecified
Target Milestone: rc
: ---
Assignee: Miroslav Grepl
QA Contact: Michal Trunecka
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-03-15 14:46 UTC by Michal Bruncko
Modified: 2014-09-30 23:34 UTC (History)
6 users (show)

Fixed In Version: selinux-policy-3.7.19-210.el6
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-11-21 10:20:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2013:1598 0 normal SHIPPED_LIVE selinux-policy bug fix and enhancement update 2013-11-20 21:39:24 UTC

Description Michal Bruncko 2013-03-15 14:46:15 UTC
Description of problem:
Nagios is unable to temporary store its checkresults file within /var/spool/nagios/checkresults/ directory:

type=AVC msg=audit(1363348682.087:103919): avc:  denied  { create } for  pid=1618 comm="nagios" name="" scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=AVC msg=audit(1363348682.087:103919): avc:  denied  { read write open } for  pid=1618 comm="nagios" name="checku4nYyg" dev=dm-5 ino=1160 scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=SYSCALL msg=audit(1363348682.087:103919): arch=c000003e syscall=2 success=yes exit=6 a0=156e170 a1=c2 a2=180 a3=632f73746c757365 items=0 ppid=1 pid=1618 auid=4294967295 uid=497 gid=497 euid=497 suid=497 fsuid=497 egid=497 sgid=497 fsgid=497 tty=(none) ses=4294967295 comm="nagios" exe="/usr/sbin/nagios" subj=system_u:system_r:nagios_t:s0 key=(null)
type=AVC msg=audit(1363348682.088:103920): avc:  denied  { getattr } for  pid=1618 comm="nagios" path="/var/spool/nagios/checkresults/checku4nYyg" dev=dm-5 ino=1160 scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=SYSCALL msg=audit(1363348682.088:103920): arch=c000003e syscall=5 success=yes exit=0 a0=6 a1=7fff9a3c60a0 a2=7fff9a3c60a0 a3=238 items=0 ppid=1 pid=1618 auid=4294967295 uid=497 gid=497 euid=497 suid=497 fsuid=497 egid=497 sgid=497 fsgid=497 tty=(none) ses=4294967295 comm="nagios" exe="/usr/sbin/nagios" subj=system_u:system_r:nagios_t:s0 key=(null)
type=AVC msg=audit(1363348682.118:103921): avc:  denied  { rename } for  pid=5441 comm="nagios" name="checkDDGaNQ" dev=dm-5 ino=1194 scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=AVC msg=audit(1363348682.118:103921): avc:  denied  { unlink } for  pid=5441 comm="nagios" name="cxsdz5q" dev=dm-5 ino=1677 scontext=system_u:system_r:nagios_t:s0 tcontext=system_u:object_r:nagios_spool_t:s0 tclass=file
type=SYSCALL msg=audit(1363348682.118:103921): arch=c000003e syscall=82 success=yes exit=0 a0=26cbe90 a1=27022a0 a2=48a668 a3=632f73746c757365 items=0 ppid=1618 pid=5441 auid=4294967295 uid=497 gid=497 euid=497 suid=497 fsuid=497 egid=497 sgid=497 fsgid=497 tty=(none) ses=4294967295 comm="nagios" exe="/usr/sbin/nagios" subj=system_u:system_r:nagios_t:s0 key=(null)

[root@watchdog nagios]# ls -alZ /var/spool/ | grep nagios
drwxr-xr-x. nagios nagios system_u:object_r:nagios_spool_t:s0 nagios
[root@watchdog nagios]# ls -alZ /var/spool/nagios/ | grep checkre
drwxr-xr-x. nagios nagios unconfined_u:object_r:nagios_spool_t:s0 checkresults

/var/spool/nagios/checkresults is standard directory used within Nagios for storing temporary check data. From documentation: This options determines which directory Nagios will use to temporarily store host and service check results before they are processed. This directory should not be used to store any other files, as Nagios will periodically clean this directory of old file (see the max_check_result_file_age option for more information). (http://nagios.sourceforge.net/docs/3_0/configmain.html)

Version-Release number of selected component (if applicable):
selinux-policy-3.7.19-195.el6_4.3.noarch
selinux-policy-targeted-3.7.19-195.el6_4.3.noarch
nagios-3.4.4-1.el6.x86_64

How reproducible:
always


thanks also

Comment 1 Miroslav Grepl 2013-03-18 14:53:52 UTC
Has been added to Fedora. Will back port it.

Comment 2 dave-redhat 2013-04-17 20:00:16 UTC
Any idea when can we expect to see this in a RHEL 6 release?

Comment 3 Michal Bruncko 2013-05-29 14:35:45 UTC
I am also waiting for this. Miroslav, please is there any ETA? 
many thanks

Comment 4 Miroslav Grepl 2013-06-03 19:20:57 UTC
Milos,
could we get qa_ack+ and then we can do a build and upload on

http://people.redhat.com/dwalsh/SELinux/RHEL6/noarch/

Comment 11 errata-xmlrpc 2013-11-21 10:20:28 UTC
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.

http://rhn.redhat.com/errata/RHBA-2013-1598.html


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