FS#70158 - [liblxqt] Polkit policy for backlight references incorrect helper path

Attached to Project: Community Packages
Opened by Nautilus Mortanian (mortanian) - Thursday, 25 March 2021, 13:22 GMT
Last edited by Toolybird (Toolybird) - Tuesday, 09 May 2023, 03:36 GMT
Task Type Bug Report
Category Packages
Status Closed
Assigned To Jerome Leclanche (Adys)
Chih-Hsuan Yen (yan12125)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description:
Policy in /usr/share/polkit-1/actions/org.lxqt.backlight.pkexec.policy contains an annotation with key org.freedesktop.policykit.exec.path and a value of /usr/bin/lxqt-backlight_backend, but lxqt-config-brightness runs "pkexec /bin/lxqt-backlight_backend" instead which does not cause this policy to validate.

Additional info:
* Package version 0.16.0-1

Steps to reproduce:
Attempt to modify backlight intensity with keyboard shortcut or lxqt configuration utility.

Rather than honoring the policykit rules, pkexec requests sudo authentication to proceed. (Pressing Brightness+ several times impatiently will cause several sudo request dialogues to open)

Altering the policy file to refer to the same path as called by lxqt-config-brightness solves this issue for me and brightness controls work as expected without requiring authorization.
This task depends upon

Closed by  Toolybird (Toolybird)
Tuesday, 09 May 2023, 03:36 GMT
Reason for closing:  No response
Additional comments about closing:  Also, cannot repro i.e. altering brightness via the settings config seems to work fine.
Comment by Chih-Hsuan Yen (yan12125) - Friday, 26 March 2021, 05:04 GMT
LXQt actually runs `pkexec lxqt-backlight_backend`. Could you check if /bin is in your $PATH? There is no need to include /bin as it is a symlink to /usr/bin on Arch Linux.

[1] https://github.com/lxqt/liblxqt/blob/0.16.0/lxqtbacklight/linux_backend/driver/libbacklight_backend.c#L102
Comment by Chih-Hsuan Yen (yan12125) - Saturday, 27 March 2021, 02:05 GMT
Thinking again, this can be considered as a upstream bug/incomplete feature. Could you create an issue on https://github.com/lxqt/liblxqt/issues and mention me (@yan12125)?

Loading...