Bug 580047 - selinux denial: comm="osa-dispatcher" cannot write to path="/sqlnet.log"
Summary: selinux denial: comm="osa-dispatcher" cannot write to path="/sqlnet.log"
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Red Hat Satellite 5
Classification: Red Hat
Component: Server
Version: unspecified
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Jan Pazdziora (Red Hat)
QA Contact: Petr Sklenar
URL:
Whiteboard: Fixed in the 5.4.0 Release - GA'd 201...
: 519174 580401 (view as bug list)
Depends On: 580401
Blocks: 462714 sat540-blockers
TreeView+ depends on / blocked
 
Reported: 2010-04-07 11:37 UTC by Petr Sklenar
Modified: 2013-04-15 11:13 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 580401 (view as bug list)
Environment:
Last Closed: 2010-10-28 15:02:02 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Petr Sklenar 2010-04-07 11:37:13 UTC
Description of problem:
there is selinux denial on satellite using external db

Version-Release number of selected component (if applicable):
sat530 updated from webqa

.qa.[root@rhndev2 ~]# rpm -qa|egrep 'selinux|osa'
libselinux-1.33.4-5.5.el5
libselinux-utils-1.33.4-5.5.el5
oracle-instantclient-sqlplus-selinux-10.2-9.6.el5sat
selinux-policy-2.4.6-255.el5_4.4
oracle-nofcontext-selinux-0.1-23.8.5.el5sat
oracle-rhnsat-selinux-10.2-11.4.el5sat
spacewalk-selinux-0.5.4-10.el5sat
selinux-policy-targeted-2.4.6-255.el5_4.4
libselinux-1.33.4-5.5.el5
oracle-instantclient-selinux-10.2-9.6.el5sat
osa-dispatcher-5.9.10-5.el5sat
jabberd-selinux-1.4.2-6.el5sat
spacewalk-monitoring-selinux-0.5.7-10.el5sat
libselinux-python-1.33.4-5.5.el5
osa-dispatcher-selinux-5.9.10-5.el5sat

How reproducible:


Steps to Reproduce:
1. have a satellite running with external db (maybe more warnings to /sqlnet.log ? )

  
Actual results:

type=AVC msg=audit(1270409217.473:2163): avc:  denied  { append } for  pid=1902 comm="osa-dispatcher" path="/sqlnet.log" dev=dm-0 ino=97442 scontext=system_u:system_r:osa_dispatcher_t:s0 tcontext=system_u:object_r:root_t:s0 tclass=file

.qa.[root@rhndev2 ~]# ls -Z /sqlnet.log
-rw-rw-rw-  root root system_u:object_r:root_t         /sqlnet.log
.qa.[root@rhndev2 ~]# restorecon /sqlnet.log
.qa.[root@rhndev2 ~]# ls -Z /sqlnet.log
-rw-rw-rw-  root root system_u:object_r:default_t      /sqlnet.log


Expected results:
no denial

Additional info:
Satellite
s390x,1.5Gb mem, external db

database:
DB User= psklenar1
DB Password=XXXX
DB SID= rhnsat10
DB hostname= test-db-3.rhndev.redhat.com
DB port= [1521] 
DB protocol= [TCP]

Comment 1 Jan Pazdziora (Red Hat) 2010-04-07 13:49:48 UTC
Can you confirm that the AVC denial only appears if the database is down / unreachable / the connect information is wrong?

In general, sqlnet.log is only written if there is a problem during connect.

That's why we did not really bother to address this AVC denial in the past.

Comment 2 Petr Sklenar 2010-04-07 15:01:28 UTC
(In reply to comment #1)
> Can you confirm that the AVC denial only appears if the database is down /
> unreachable / the connect information is wrong?

Right , it was in time of db issue, so there are only few denials on /sqlnet.log for last month or so.

> 
> In general, sqlnet.log is only written if there is a problem during connect.
> 
> That's why we did not really bother to address this AVC denial in the past.

Comment 3 Jan Pazdziora (Red Hat) 2010-04-07 17:50:11 UTC
(In reply to comment #2)
> 
> Right , it was in time of db issue, so there are only few denials on
> /sqlnet.log for last month or so.

Thanks. In that case, let me move it from the 5.3.1 triage to later queue.

Comment 4 Jan Pazdziora (Red Hat) 2010-04-08 07:57:15 UTC
We should use something like /usr/lib64/oracle/10.2.0.4/client/lib/network/admin/sqlnet.ora to set log_directory_client = /var/log/something and SELinux-label that /var/log/something (or sqlnet.log in it) in such a way that all client programs can append to it.

Comment 5 Jan Pazdziora (Red Hat) 2010-04-08 07:58:02 UTC
Adding Michael to Cc.

Comment 6 Jan Pazdziora (Red Hat) 2010-05-04 08:23:29 UTC
Addressed in Spacewalk master 72755b7518ecde99364eb8726fca0d39f6b1fbb2 and d9c9529015b0ae3705046cc318e238fd415484d6.

Comment 7 Michael Mráka 2010-05-05 14:56:24 UTC
*** Bug 580401 has been marked as a duplicate of this bug. ***

Comment 9 Petr Sklenar 2010-09-03 12:52:10 UTC
I didnt see a denial on /sqlnet.log
Verified with Satellite-5.4.0-RHEL5-re20100827.0 on x86646 rhel55

Comment 10 Clifford Perry 2010-10-28 15:02:02 UTC
The 5.4.0 RHN Satellite and RHN Proxy release has occurred. This issue has been resolved with this release. 


RHEA-2010:0801 - RHN Satellite Server 5.4.0 Upgrade
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10332

RHEA-2010:0803 - RHN Tools enhancement update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10333

RHEA-2010:0802 - RHN Proxy Server 5.4.0 bug fix update
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10334

RHEA-2010:0800 - RHN Satellite Server 5.4.0
https://rhn.redhat.com/rhn/errata/details/Details.do?eid=10335

Docs are available:

http://docs.redhat.com/docs/en-US/Red_Hat_Network_Satellite/index.html 

Regards,
Clifford

Comment 12 Jan Pazdziora (Red Hat) 2013-04-15 11:13:10 UTC
*** Bug 519174 has been marked as a duplicate of this bug. ***


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