Closed sscargal closed 2 years ago
I'll see about having someone look into it.
I ran into this issue when trying to determine whether I had built the right version number into a binary. I was invoking ipmctl version
on a machine without any PMem, something that I would expect to work.
In my case I was building v02.00.00.3878.
I used Ubuntu 20.04 when filing this issue. I recently tried on CentOS 7.9 with ipmctl 02.00.00.3833 and didn't see the issue
$ cat /etc/centos-release
CentOS Linux release 7.9.2009 (Core)
$ id
uid=1001(ipmctluser) gid=1001(ipmctluser) groups=1001(ipmctluser) context=unconfined_u:unconfined_r:unconfined_t:s0-s0:c0.c1023
$ ipmctl version
Intel(R) Optane(TM) Persistent Memory Command Line Interface Version 02.00.00.3833
Issue
A non-root user running
ipmctl version
gets the following error:A version command should not require root. The expected output is the version string:
It works as sudo or root
ipmctl previously fixed this issue, so this appears to be a regression. Commit cc23fb179333a737701bba0c95b7bae2e40dbd81 added the option for non-root users to execute the
version
command. The current master branch shows the following:DcpmemPkg/cli/CommandParser.c
ipmctl help
works as a non-root user.ipmctl version
now performs some sanity checks that do require root, see DcpmPkg/cli/NvmDimmCli.c#L1096. Perhaps these sanity checks can be skipped for non-root users.