Bug 815725 - semanage fcontext -l -e requires two arguments
semanage fcontext -l -e requires two arguments
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: policycoreutils (Show other bugs)
17
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Daniel Walsh
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2012-04-24 07:29 EDT by Stef Walter
Modified: 2012-12-20 11:17 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2012-12-20 11:17:11 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Stef Walter 2012-04-24 07:29:00 EDT
Description of problem:

The command 'semanage fcontext -l -e' fails unless you specify two paths as arguments. These arguments are not used, as far as I can tell. They can be anything.

The same applies to semanage fcontext -D -e

This is confusing.

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

Name        : policycoreutils
Arch        : x86_64
Version     : 2.1.11
Release     : 5.fc17

How reproducible:

Every time

Steps to Reproduce:
1. Run 'semanage fcontext -l -e' as root
  
Actual results:

/sbin/semanage: 
semanage [ -S store ] -i [ input_file | - ]
semanage [ -S store ] -o [ output_file | - ]

semanage login -{a|d|m|l|D|E} [-nsr] login_name | %groupname
semanage user -{a|d|m|l|D|E} [-LnrRP] selinux_name
semanage port -{a|d|m|l|D|E} [-ntr] [ -p proto ] port | port_range
semanage interface -{a|d|m|l|D|E} [-ntr] interface_spec
semanage module -{a|d|m} [--enable|--disable] module
semanage node -{a|d|m|l|D|E} [-ntr] [ -p protocol ] [-M netmask] addr
semanage fcontext -{a|d|m|l|D|E} [-efnrst] file_spec
semanage boolean -{d|m} [--on|--off|-1|-0] -F boolean | boolean_file
semanage permissive -{d|a|l} [-n] type
semanage dontaudit [ on | off ]
...

Expected results:

Print out the fcontext info.
Comment 1 Stef Walter 2012-04-24 07:34:05 EDT
Hmmm, it looks like the '-e' isn't needed at all. 'semanage fcontext -l' works fine.
Comment 2 Stef Walter 2012-04-24 08:00:51 EDT
A patch something like this, might help clear things up. The manpage confused me :)

diff --git a/policycoreutils/semanage/semanage.8 b/policycoreutils/semanage/sema
index c5e18d9..91a01a1 100644
--- a/policycoreutils/semanage/semanage.8
+++ b/policycoreutils/semanage/semanage.8
@@ -44,9 +44,11 @@ Manage network node type definitions
 
 Manage file context mapping definitions
 .br
-.B semanage fcontext [\-S store] \-{a|d|m|l|D} [\-fnrst] file_spec
+.B semanage fcontext [\-S store] \-{l|D} [\-nrst] file_spec
 .br
-.B semanage fcontext [\-S store] \-{a|d|m|l|D} [\-n] \-e replacement target
+.B semanage fcontext [\-S store] \-{a|d|m} [\-frst] file_spec
+.br
+.B semanage fcontext [\-S store] \-{a|d|m} \-e replacement target
 .br
Comment 3 Daniel Walsh 2012-04-24 11:23:58 EDT
Applied fix to policycoreutils-2.1.11-7.fc18

Will back port to F17 on next push of policycoreutils.
Comment 4 Daniel Walsh 2012-10-16 15:18:54 EDT
Fixed in policycoreutils-2.1.12-4.fc17
Comment 5 Fedora Update System 2012-10-24 09:04:12 EDT
policycoreutils-2.1.12-4.fc17 has been submitted as an update for Fedora 17.
https://admin.fedoraproject.org/updates/policycoreutils-2.1.12-4.fc17
Comment 6 Fedora Update System 2012-10-24 19:56:04 EDT
Package policycoreutils-2.1.12-4.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing policycoreutils-2.1.12-4.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16848/policycoreutils-2.1.12-4.fc17
then log in and leave karma (feedback).
Comment 7 Fedora Update System 2012-10-31 21:24:56 EDT
Package policycoreutils-2.1.12-5.fc17:
* should fix your issue,
* was pushed to the Fedora 17 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing policycoreutils-2.1.12-5.fc17'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2012-16848/policycoreutils-2.1.12-5.fc17
then log in and leave karma (feedback).
Comment 8 Fedora Update System 2012-12-20 11:17:13 EST
policycoreutils-2.1.12-5.fc17 has been pushed to the Fedora 17 stable repository.  If problems still persist, please make note of it in this bug report.

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