Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.
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 872700

Summary: semodule in RHEL-6 behaves differently than in RHEL-7
Product: Red Hat Enterprise Linux 6 Reporter: Milos Malik <mmalik>
Component: libsemanageAssignee: Petr Lautrbach <plautrba>
Status: CLOSED ERRATA QA Contact: Milos Malik <mmalik>
Severity: medium Docs Contact:
Priority: medium    
Version: 6.4CC: dwalsh, eparis, lvrabec, mgrepl, mmalik, plautrba, pvrabec, ssekidde
Target Milestone: rc   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2015-07-22 07:33:22 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Milos Malik 2012-11-02 18:59:50 UTC
Description of problem:

Version-Release number of selected component (if applicable):
policycoreutils-2.0.83-19.26.el6
libsemanage-2.0.43-4.2.el6

How reproducible:
always

Steps to Reproduce:
# semodule -l | grep perm
permissivedomains	1.0.0	
# semodule -e permissivedomains
libsemanage.semanage_direct_enable: Module permissivedomains was not found.
semodule:  Failed!
# semodule -d permissivedomains
# semodule -d permissivedomains
libsemanage.semanage_direct_disable: Module permissivedomains was not found.
semodule:  Failed!
# semodule -l | grep perm
permissivedomains	1.0.0	Disabled
#
  
Actual results:
 * semodule fails when enabling an already enabled module
 * semodule fails when disabling an already disabled module

Expected results:
 * semodule succeeds when enabling an already enabled module
 * semodule succeeds when disabling an already disabled module

Comment 2 Daniel Walsh 2012-11-05 17:22:01 UTC
You want the RHEL7 method back ported form RHEL6?

Comment 3 Milos Malik 2012-11-06 07:30:54 UTC
I would like to see RHEL-6 semodule behaving in the same way as in RHEL-7:
 * when a policy module xyz is already enabled, another "semodule -e xyz" command should not lead to error message
 * when a policy module xyz is already disabled, another "semodule -d xyz" command should not lead to error message
 * error messages mentioned in comment#0 are misleading, the policy module is present and is already in the desired state

Comment 4 RHEL Program Management 2012-12-14 07:19:56 UTC
This request was not resolved in time for the current release.
Red Hat invites you to ask your support representative to
propose this request, if still desired, for consideration in
the next release of Red Hat Enterprise Linux.

Comment 6 Petr Lautrbach 2015-02-24 13:17:37 UTC
It was fixed/change in Fedora in libsemanage package [1] [2]. Both patches seems to be simply backportable.

[1] https://github.com/fedora-selinux/selinux/commit/654dcb897e49908a958dae55cf29793412c4b390
[2] https://github.com/fedora-selinux/selinux/commit/c1323f22c7ad93b975eb8b6a251b893bc88f240f

Comment 9 errata-xmlrpc 2015-07-22 07:33:22 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.

https://rhn.redhat.com/errata/RHBA-2015-1403.html