Bugzilla (bugzilla.redhat.com) will be under maintenance for infrastructure upgrades and will not be available on July 31st between 12:30 AM - 05:30 AM UTC. We appreciate your understanding and patience. You can follow status.redhat.com for details.
Bug 815725 - semanage fcontext -l -e requires two arguments
Summary: semanage fcontext -l -e requires two arguments
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: policycoreutils
Version: 17
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Daniel Walsh
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-04-24 11:29 UTC by Stef Walter
Modified: 2012-12-20 16:17 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2012-12-20 16:17:11 UTC
Type: Bug


Attachments (Terms of Use)

Description Stef Walter 2012-04-24 11:29:00 UTC
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 11:34:05 UTC
Hmmm, it looks like the '-e' isn't needed at all. 'semanage fcontext -l' works fine.

Comment 2 Stef Walter 2012-04-24 12:00:51 UTC
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 15:23:58 UTC
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 19:18:54 UTC
Fixed in policycoreutils-2.1.12-4.fc17

Comment 5 Fedora Update System 2012-10-24 13:04:12 UTC
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 23:56:04 UTC
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-11-01 01:24:56 UTC
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 16:17:13 UTC
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.