[Samba] wbinfo -U arguments vs --help
Michael Tokarev
mjt at tls.msk.ru
Mon Oct 31 12:35:17 UTC 2022
For fun, just found an interesting tidbbit with wbinfo cmdline parsing..
# wbinfo --help | grep uid-to
-U, --uid-to-sid=UID Converts uid to sid
but:
$ wbinfo --uid-to-sid=mjt
Invalid option
Usage: [OPTION...]
-u, --domain-users Lists all domain users
...
Here, there are 2 issues: first, it does not recognize -U/--uid-to-sid
option at all (which is listed in its help output and is documented
in the manpage).
It is interesting how this ever happened. It seems to be consistent
in 4.13, 4.16 and 4.17 releases.
And second, and this very annoying issue is quite common - it prints
out whole --help output in case of option error. It should only print
help/usage when --help is requested, - in case of actual error, this
makes it difficult to find. And it definitely should clarify which
option is invalid, - it is easy to see if there's only one option,
but if the command line is long, finding the wrong one becomes a
real challenge...
/mjt
More information about the samba
mailing list