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 700522 - pki tomcat6 instances currently running unconfined
Summary: pki tomcat6 instances currently running unconfined
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: pki-core
Version: 6.1
Hardware: All
OS: Linux
unspecified
high
Target Milestone: rc
: 6.2
Assignee: Ade Lee
QA Contact: Chandrasekar Kannan
URL:
Whiteboard:
Depends On: 700505
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-04-28 15:18 UTC by Ade Lee
Modified: 2015-01-04 23:48 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of: 700505
Environment:
Last Closed: 2011-12-06 16:29:04 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
patch to allow server to come up if selinux disabled (838 bytes, patch)
2011-08-15 20:29 UTC, Ade Lee
awnuk: review+
Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1655 0 normal SHIPPED_LIVE pki-core bug fix and enhancement update 2011-12-06 00:50:24 UTC

Description Ade Lee 2011-04-28 15:18:27 UTC
+++ This bug was initially created as a clone of Bug #700505 +++

Description of problem:

Due to changes in the startup scripts, pki tomcat6 instances (on tip and on ipa branch) currently run unconfined.  That is, the pki selinux policy is present but is not being used.


Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.
  
Actual results:


Expected results:


Additional info:

Comment 1 Jenny Severance 2011-05-27 14:09:06 UTC
Needs some additional information - how to verify fix? thx

Comment 2 Ade Lee 2011-08-09 17:32:39 UTC
Patch in BZ 700505:

6.2 branch:

[vakwetu@goofy-vm6 base]$ svn ci -m "Resolves #700505 - pki tomcat6 instances currently running unconfined"
Sending        base/common/scripts/functions
Sending        base/selinux/src/pki.fc
Sending        base/selinux/src/pki.if
Sending        base/selinux/src/pki.te
Transmitting file data ....
Committed revision 2128.

Comment 3 Ade Lee 2011-08-09 17:36:05 UTC
How to verify:

1. make sure selinux is enabled and enforcing
2. pkicreate an instance -- or install ipa
3. installation should complete successfully.
4.  Check context of the java process

ps -efZ |grep pki-ca

It should show something like this :

unconfined_u:system_r:pki_ca_t:s0 pkiuser 25191    1  0 09:37 ?        00:00:18 /usr/lib/jvm/java/bin/java -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -classpath :/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/var/lib/pki-ca -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp -Djava.util.logging.config.file=/var/lib/pki-ca/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 vakwetu 25794 14003  0 10:29 pts/0 00:00:00 grep pki-ca

The important bit is unconfined_u:system_r:pki_ca_t:s0 pkiuser and in particular pki_ca_t .  Before, it used to be unconfined_java_t

Comment 4 Matthew Harmsen 2011-08-09 18:52:35 UTC
Patch 'pki/patches/pki-core-9.0.3-r2128.patch' was previously checked-in as revision #2129.

IPA_v2_RHEL_6_ERRATA_BRANCH:

# cd pki

# svn status | grep -v ^$ | grep -v ^P | grep -v ^X | grep -v ^?
M       specs/pki-core.spec

# svn commit
Sending        specs/pki-core.spec
Transmitting file data .
Committed revision 2134.

Comment 6 Ade Lee 2011-08-15 20:29:03 UTC
Created attachment 518326 [details]
patch to allow server to come up if selinux disabled

Comment 7 Ade Lee 2011-08-15 20:49:57 UTC
6,2:

Patch reviewed in BZ 700505:

svn ci -m "Resolves #700522 - pki tomcat6 instances currently running unconfined, allow server to come up when selinux disabled" base/common/
Sending        base/common/scripts/functions
Transmitting file data .
Committed revision 2147.

Comment 8 Kashyap Chamarthy 2011-11-08 17:57:46 UTC
VERIFIED

Version Info.
#######################################
[root@ipaqavma ~]# rpm -qi pki-ca
Name        : pki-ca                       Relocations: (not relocatable)
Version     : 9.0.3                             Vendor: Red Hat, Inc.
Release     : 20.el6                        Build Date: Mon 03 Oct 2011 08:08:55 PM EDT
Install Date: Tue 08 Nov 2011 01:05:46 AM EST      Build Host: x86-002.build.bos.redhat.com

Correct context is set now.
#######################################
[root@ipaqavma ~]# ps -efZ |grep pki-ca
unconfined_u:system_r:pki_ca_t:s0 pkiuser 2361     1  0 08:42 ?        00:00:25 /usr/lib/jvm/jre/bin/java -Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory -classpath :/usr/share/tomcat6/bin/bootstrap.jar:/usr/share/tomcat6/bin/tomcat-juli.jar:/usr/share/java/commons-daemon.jar -Dcatalina.base=/var/lib/pki-ca -Dcatalina.home=/usr/share/tomcat6 -Djava.endorsed.dirs= -Djava.io.tmpdir=/var/cache/tomcat6/temp -Djava.util.logging.config.file=/var/lib/pki-ca/conf/logging.properties -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager org.apache.catalina.startup.Bootstrap start
unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 5020 5002  0 12:50 pts/2 00:00:00 grep pki-ca
[root@ipaqavma ~]# 
[root@ipaqavma ~]# 
#######################################

Comment 9 errata-xmlrpc 2011-12-06 16:29:04 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-2011-1655.html


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