Bug 805742
Summary: | SELINUX_ERR when using config tools to install packages | ||
---|---|---|---|
Product: | Red Hat Enterprise Linux 6 | Reporter: | Gordon Messmer <gordon.messmer> |
Component: | selinux-policy | Assignee: | Miroslav Grepl <mgrepl> |
Status: | CLOSED ERRATA | QA Contact: | Michal Trunecka <mtruneck> |
Severity: | unspecified | Docs Contact: | |
Priority: | unspecified | ||
Version: | 6.2 | CC: | cstpierr, dwalsh, ebenes, jsbillin, mmalik, mtruneck, sol.jerome |
Target Milestone: | rc | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | selinux-policy-3.7.19-146.el6 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2012-06-20 12:32:26 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Gordon Messmer
2012-03-22 01:07:06 UTC
I'm not familiar with bcfg2* packages. Could you help me a little? I'm able to start bcfg2-server and it runs without errors. How do you invoke bcfg2 to install a package? It seems that bcfg2-server does not have its own SELinux domain. It runs as initrc_t. # rpm -qa selinux-policy\* selinux-policy-targeted-3.7.19-142.el6.noarch selinux-policy-minimum-3.7.19-142.el6.noarch selinux-policy-3.7.19-142.el6.noarch selinux-policy-doc-3.7.19-142.el6.noarch selinux-policy-mls-3.7.19-142.el6.noarch # sestatus SELinux status: enabled SELinuxfs mount: /selinux Current mode: enforcing Mode from config file: enforcing Policy version: 24 Policy from config file: targeted # ps -efZ | grep bcfg unconfined_u:system_r:initrc_t:s0 root 7002 1 0 05:14 ? 00:00:00 /usr/bin/python /usr/sbin/bcfg2-server -D /var/run/bcfg2-server.pid unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023 root 7190 6459 0 05:38 pts/0 00:00:00 grep bcfg # The problem is bcfg2 was run directly from unconfined_t. How is bcfg2 used in your case? Hi, I've also been hit by this bug so I can provide a bit more information. Bcfg2 is a configuration management service, and the bcfg2 client is what's actually triggering this issue. It's actually kind of complex to set up an example, but there's documentation here: http://docs.bcfg2.org/appendix/guides/centos.html#appendix-guides-centos The issue isn't with bcfg2-server, but with the bcfg2 package, which uses the yum python libraries to install packages. Most often, bcfg2 is run on the command line or as a cron job. Both instances trigger this problem. See the bcfg2 bug report here: http://trac.mcs.anl.gov/projects/bcfg2/ticket/1095 The issue is that when bcfg2 is invoked, it is capable of installing packages, but any packages that have preinstall scripts that attempt to create users or groups fail. Changing the SELinux type on the bcfg2 executable to rpm_exec_t allows it to transition from the unconfined role to one which is allowed to run useradd and groupadd. The temporary solution is to add that attribute to bcfg2, but it would be nice if /usr/sbin/bcfg2 could have the rpm_exec_t type in the RHEL6 selinux policy. chcon -t rpm_exec_t /usr/sbin/bcfg2 Daniel Walsh: Yes, that's the temporary solution I proposed in the bcfg2 ticket above. Actually, I'm currently running: semanage fcontext -a -t rpm_exec_t /usr/sbin/bcfg2 and restorecon /usr/sbin/bcfg2 for now, until the selinux policy is updated on RHEL6. Great. I added it to Fedora, backporting to RHEL6.3. Could you also create a new SELinux domain for bcfg2-server ? I noticed that it runs as initrc_t. (In reply to comment #10) > Could you also create a new SELinux domain for bcfg2-server ? I noticed that it > runs as initrc_t. This issue has nothing to do with the bcfg2-server process. Milos is this server just running to install packages? (In reply to comment #12) > Milos is this server just running to install packages? The bcfg2-server process started from the init script doesn't install packages. The client (/usr/sbin/bcfg2) installs packages. This is configuration management software, the server just directs the clients what packages are to be installed, based on the definitions in the configuration. Ok lets open a separate bugzilla for this. The /usr/sbin/bcfg2 label has been fixed. 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-2012-0780.html |