Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1499259 - semanage fcontext "-f/--ftype" description is broken
semanage fcontext "-f/--ftype" description is broken
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: policycoreutils (Show other bugs)
7.4
All Linux
low Severity low
: rc
: ---
Assigned To: Vit Mojzis
Dalibor Pospíšil
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2017-10-06 09:40 EDT by Renaud Métrich
Modified: 2018-04-10 12:38 EDT (History)
8 users (show)

See Also:
Fixed In Version: policycoreutils-2.5-22.el7
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2018-04-10 12:38:03 EDT
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)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHSA-2018:0913 None None None 2018-04-10 12:38 EDT

  None (edit)
Description Renaud Métrich 2017-10-06 09:40:09 EDT
Description of problem:

semanage fcontext --help shows the following for "-f/--ftype":

  -f {a,f,d,c,b,s,l,p}, --ftype {a,f,d,c,b,s,l,p}
                        File Type. This is used with fcontext. Requires a file
                        type as shown in the mode field by ls, e.g. use -d to
                        match only directories or -- to match only regular
                        files. The following file type options can be passed:
                        -- (regular file),-d (directory),-c (character
                        device), -b (block device),-s (socket),-l (symbolic
                        link),-p (named pipe) If you do not specify a file
                        type, the file type will default to "all files".

The expected character (a, f, d, c, ...) differs from the actual text.
For example to match a regular file, "f" should be used instead of "--".
Also, the first dash in option should be removed (e.g. "-d" -> "d").

The manpage is accurrate.


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

policycoreutils-python-2.2.5-21.el7_2.x86_64
Comment 2 Milos Malik 2017-10-06 10:12:34 EDT
You're right. Manually executed semanage fcontext ... confirms following mapping:

-f a -> all files
-f b -> block device
-f c -> character device
-f f -> regular file
-f d -> directory
-f l -> symbolic link
-f p -> named pipe
-f s -> socket
without -> all files
Comment 9 errata-xmlrpc 2018-04-10 12:38:03 EDT
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://access.redhat.com/errata/RHSA-2018:0913

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