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 1667096 - lsmcli fs-export --anongid/anonuid allows invalid values
Summary: lsmcli fs-export --anongid/anonuid allows invalid values
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: libstoragemgmt
Version: 7.6
Hardware: Unspecified
OS: Unspecified
low
low
Target Milestone: rc
: ---
Assignee: Tony Asleson
QA Contact: Jakub Krysl
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-01-17 12:50 UTC by Jakub Krysl
Modified: 2021-09-03 14:09 UTC (History)
0 users

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-06 12:40:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2019:2064 0 None None None 2019-08-06 12:40:34 UTC

Description Jakub Krysl 2019-01-17 12:50:24 UTC
Description of problem:
Valid values for user/group ID is 0 to 65534 with special -1 as omitted value. So giving values out of range -1 to 65534 should fail, but it does not.

Version-Release number of selected component (if applicable):
libstoragemgmt-1.7.2-1.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1. lsmcli -u sim:// fs-export --fs FS_ID_00001 --exportpath /foo/bar --rw-host local --anonuid -2
2. lsmcli -u sim:// fs-export --fs FS_ID_00001 --exportpath /foo/bar --rw-host local --anongid -2
3. lsmcli -u sim:// fs-export --fs FS_ID_00001 --exportpath /foo/bar --rw-host local --anongid 65535
3. lsmcli -u sim:// fs-export --fs FS_ID_00001 --exportpath /foo/bar --rw-host local --anonuid 65535

Actual results:
fs exported

Expected results:
INAVLID_ARGUMENT(101)

Additional info:

Comment 2 Jakub Krysl 2019-01-17 12:59:01 UTC
netapp plugin anonuid invalid value results in PLUGIN_BUG(2), anongid shows correctly INVALID_AGUMENT(101)

# lsmcli -u "ontap+ssl://root@*****" fs-export --exportpath='/foo/bar' --fs='8c799d3f-01d0-4f29-9253-42fffbbfe29f' --rw-host local --anonuid='-2' -P
Password: 
PLUGIN_BUG(2): Append rules failed with error: Invalid argument  (vendor error code= 22)

# lsmcli -u "ontap+ssl://root@*****" fs-export --exportpath='/foo/bar' --fs='8c799d3f-01d0-4f29-9253-42fffbbfe29f' --rw-host local --anongid='-2' -P
Password: 
INVALID_ARGUMENT(101): ontap plugin does not support anon_gid setting

Comment 3 Tony Asleson 2019-02-11 17:20:03 UTC
UID & GID are unsigned values, thus < 0 should not be accepted as a valid input on the command line.  Internally in the API we use -1 & -2 to signify certain things, but that shouldn't be known or used for command line use.  As for the upper range, depending on the type and version of Unix like system it can vary.  For example older versions of Linux the limit was 16 bits, newer versions it's 32.  Thus I'm hesitant to impose an upper limit in the command line interface as we will likely get it wrong some times.  The plugin/array should be ultimately validating the value.

Comment 6 Jakub Krysl 2019-03-28 11:56:41 UTC
libstoragemgmt-1.7.3-2.el7.x86_64

# lsmcli -u "ontap+ssl://root@*****" fs-export --exportpath='/foo/bar' --fs='8c799d3f-01d0-4f29-9253-42fffbbfe29f' --rw-host local --anonuid='-2' -P
usage: lsmcli fs-export [-h] [-v] [-u <URI>] [-P] [-H] [-t <SEP>] [-e] [-f]
                        [-w CHILD_WAIT] [--header] [-b] [-s] --fs <FS_ID>
                        [--exportpath <EXPORT_PATH>] [--anonuid <ANON_UID>]
                        [--anongid <ANON_GID>] [--auth-type <AUTH_TYPE>]
                        [--root-host <ROOT_HOST>] [--ro-host <RO_HOST>]
                        [--rw-host <RW_HOST>]
lsmcli fs-export: error: argument --anonuid: invalid: require positive integer value '-2'

# lsmcli -u "ontap+ssl://root@*****" fs-export --exportpath='/foo/bar' --fs='8c799d3f-01d0-4f29-9253-42fffbbfe29f' --rw-host local --anongid='-2' -P
usage: lsmcli fs-export [-h] [-v] [-u <URI>] [-P] [-H] [-t <SEP>] [-e] [-f]
                        [-w CHILD_WAIT] [--header] [-b] [-s] --fs <FS_ID>
                        [--exportpath <EXPORT_PATH>] [--anonuid <ANON_UID>]
                        [--anongid <ANON_GID>] [--auth-type <AUTH_TYPE>]
                        [--root-host <ROOT_HOST>] [--ro-host <RO_HOST>]
                        [--rw-host <RW_HOST>]
lsmcli fs-export: error: argument --anongid: invalid: require positive integer value '-2'

Comment 8 errata-xmlrpc 2019-08-06 12:40:28 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://access.redhat.com/errata/RHBA-2019:2064


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