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.
Hmmm, it looks like the '-e' isn't needed at all. 'semanage fcontext -l' works fine.
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
Applied fix to policycoreutils-2.1.11-7.fc18 Will back port to F17 on next push of policycoreutils.
Fixed in policycoreutils-2.1.12-4.fc17
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
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).
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).
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.