Red Hat Bugzilla – Bug 193924
Run-As-Requestor test fails with SELinux policies active
Last modified: 2007-11-30 17:07:25 EST
Description of problem:
The "Run-As-Requestor" feature fails if the OpenPegasus SELinux policies are
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. cimprovider -r -m OperatingSystemModule
2. Modify the PG_Provider Module instance definition
in /usr/share/Pegasus/mof/Pegasus/PG_OperatingSystem20R.mof as follows:
2a. Change the InterfaceVersion from "2.1.0" to "2.5.0".
2b. Add the new property
UserContext = 2;
3. cimmof -n
FAILURE: Test is failing when run by a non-root user.
$ osinfo osinfo error: CIM_ERR_FAILED: A general error occurred that is not
covered by a more specific error code: "Failed to communicate with
06/01/2006-20:55:17: OsAbstraction [3810:1115699552:SystemUnix.cpp:1139]:
setgid failed: Operation not permitted
06/01/2006-20:55:17: DiscardedData [3810:1115699552]: System::changeUserContext
() failed. userName = guest.
06/01/2006-20:55:17: OsAbstraction [3765:1115699552]: Failed to read buffer
from pipe: connection closed
Yes, this would appear to be due to missing SELinux policy:
'allow pegasus_t self:capability setgid;'
With selinux-policy-targeted-1.17.30-2.134, we allowed pegasus_t the
'setuid' capability, but not the 'setgid' capability :-(
This needs to be fixed in the next release of the RHEL-4 selinux-policy-targeted.
Sounds good. Thanks!
Fixed in 1.17.30-2.138
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release. Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products. This request is not yet committed for inclusion in an Update
OpenPegasus SELinux testing can be tricky, but I believe this one is resolved
in RHEL4 U4 with the release of selinux-policy-targeted-1.17.30-2.140. Can
you verify that the fix was not included?
Yes this release contained fixes for pegasus.
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.