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 1208797 - semanage -o does not work in combination with -S minimum
Summary: semanage -o does not work in combination with -S minimum
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: policycoreutils
Version: 7.1
Hardware: All
OS: Linux
medium
medium
Target Milestone: rc
: ---
Assignee: Petr Lautrbach
QA Contact: Dalibor Pospíšil
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-04-03 08:36 UTC by Milos Malik
Modified: 2015-11-19 12:49 UTC (History)
8 users (show)

Fixed In Version: policycoreutils-2.2.5-19.el7
Doc Type: Bug Fix
Doc Text:
Clone Of: 1122850
Environment:
Last Closed: 2015-11-19 12:49:07 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:2098 0 normal SHIPPED_LIVE policycoreutils bug fix update 2015-11-19 11:13:08 UTC

Description Milos Malik 2015-04-03 08:36:48 UTC
Following commands work fine:
 # semanage -S mls -o -
 # semanage -S targeted -o -

but "semanage -S minimum -o -" does not. Even if the selinux-policy-minimum package is installed.

Version-Release number of selected component (if applicable):
policycoreutils-2.2.5-15.el7.x86_64
policycoreutils-devel-2.2.5-15.el7.x86_64
policycoreutils-newrole-2.2.5-15.el7.x86_64
policycoreutils-python-2.2.5-15.el7.x86_64
policycoreutils-restorecond-2.2.5-15.el7.x86_64
policycoreutils-sandbox-2.2.5-15.el7.x86_64
selinux-policy-3.13.1-24.el7.noarch
selinux-policy-devel-3.13.1-24.el7.noarch
selinux-policy-doc-3.13.1-24.el7.noarch
selinux-policy-minimum-3.13.1-24.el7.noarch
selinux-policy-mls-3.13.1-24.el7.noarch
selinux-policy-sandbox-3.13.1-24.el7.noarch
selinux-policy-targeted-3.13.1-24.el7.noarch

Steps to reproduce:
# ls -l /etc/selinux/minimum/
total 16
-rw-r--r--. 1 root root 2589 Mar 31 09:12 booleans.subs_dist
drwxr-xr-x. 4 root root 4096 Apr  2 10:21 contexts
drwxr-xr-x. 2 root root    6 Mar 31 09:12 logins
drwxr-xr-x. 3 root root   70 Apr  2 10:21 modules
drwxr-xr-x. 2 root root   22 Apr  2 10:21 policy
-rw-r--r--. 1 root root  607 Mar 31 09:12 setrans.conf
-rw-r--r--. 1 root root  176 Apr  2 10:21 seusers
# semanage -S minimum -o -
usage: semanage export [-h] [-S STORE] [-f OUTPUT_FILE]
semanage export: error: argument -S/--store: expected one argument
# echo $?
2
#

Comment 1 Miroslav Grepl 2015-07-09 07:47:34 UTC
Easy fix.

--- /usr/sbin/semanage~	2015-07-09 09:46:03.644120855 +0200
+++ /usr/sbin/semanage	2015-07-09 09:46:14.903176323 +0200
@@ -798,7 +798,7 @@
 
 def make_io_args(args):
     # import/export backward compability
-    args_origin = ["-S", "-o", "-i", "targeted", "minumum", "mls"]
+    args_origin = ["-S", "-o", "-i", "targeted", "minimum", "mls"]
     args_file = []
     args_ie = []
     args_subcommand = []

Comment 2 Petr Lautrbach 2015-07-09 08:15:17 UTC
Mirek, thank you for the patch.

Comment 5 errata-xmlrpc 2015-11-19 12:49:07 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-2098.html


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