vmihalko / t2_polkit

Other
0 stars 0 forks source link

pkcheck wrong argument handling #161

Closed vmihalko closed 1 year ago

vmihalko commented 3 years ago

In GitLab by @HonP on Oct 1, 2021, 15:07

Argument handling does not work as it should:

LT-ntb # pkcheck --version

pkcheck version 0.119

LT-ntb # pkcheck -h

pkcheck: Unexpected argument `-h'

LT-ntb # pkcheck --action-id=

pkcheck: Unexpected argument `--action-id='

LT-ntb # pkcheck --asdasd

pkcheck: Unexpected argument `--asdasd'

LT-ntb # pkcheck -a

pkcheck: Argument expected after `--action-id'

system: gentoo

package: sys-auth/polkit-0.119-r2 `

vmihalko commented 3 years ago

In GitLab by @jrybar on Oct 5, 2021, 17:13

man pkcheck

Half of the options you listed do not exist.
--action requires action name to follow.

But it would be nice to have some short options implemented (like -v, -h and its help text) using getopts :wink:

vmihalko commented 3 years ago

In GitLab by @HonP on Oct 12, 2021, 12:00

man is ok, but help is not (only cosmetics)

LT-ntb ~ # pkcheck --help

Usage:

pkcheck [OPTION...]

Help Options:

-h, --help Show help options

Application Options:

-a, --action-id=ACTION Check authorization to perform ACTION

-u, --allow-user-interaction Interact with the user if necessary

-d, --details=KEY VALUE Add (KEY, VALUE) to information about the action

--enable-internal-agent Use an internal authentication agent if necessary

--list-temp List temporary authorizations for current session

-p, --process=PID[,START_TIME,UID] Check authorization of specified process

--revoke-temp Revoke all temporary authorizations for current session

-s, --system-bus-name=BUS_NAME Check authorization of owner of BUS_NAME

--version Show version

Report bugs to: http://lists.freedesktop.org/mailman/listinfo/polkit-devel

polkit home page: http://www.freedesktop.org/wiki/Software/polkit

vmihalko commented 3 years ago

In GitLab by @jrybar on Oct 12, 2021, 12:13

OIC, --help does not correspond to man.
But only for -h, as I can see in the code.
I believe the OP never considered -v because it was reserved for --verbose in pkaction. It was probably meant to keep the pattern throughout the binaries, IDK.

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@ba2af82c2420f5155dfc7795870bc614eaffa159

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@059dc0ab90ac2086f05dce87b99e119978d8ef7e

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@8798eabb5b6ae77896bc603df509940852071cfc

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@9e321a1d921b3d60287e7809f663311d8b8981db

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@f41ffd5613b24d2a6a6bf3ce7cba80010479890b

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@7e75dcd13214082203dfffc0f863a4fe95296538

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@a2fd9a5fa086f5231a5d259a931f7516ed15a91e

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@2533c7fd94608d4debcf64001f06b5f979fa55e3

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@fff6e64675cbdda1929bb8c03f1ca7f53d179e17

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@396ee617e50ddf693e5b9e96c152bcd8a71e714b

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@de0d13ee168ea26afba3dee3ca6888b73dd4e97d

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@90cfbf220a5f1cd1e40b72373f70aa28ec46b04e

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@0c0137f303f9b93e1ffe961a0618d8cae22f7781

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@e61bc6055c1c38ff8bd31f53de122af55552e685

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@6ddd5928582cdc834e202b2377d354c6dc7080ab

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@b339e7e5df545da1c6fbfed4a76acdd758c37803

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@8302224bb43246fc9d95b744f179afa1f6bc01bf

vmihalko commented 1 year ago

mentioned in commit vmihalko/polkit@4b047759efdc860d871a73dbd593b8f7ecd1f6ae