[GUI] Auth prompt hardcodes bad username if caller isn't sudoer
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
HPLIP |
In Progress
|
Undecided
|
Unassigned |
Bug Description
Hi,
I have an report in Fedora https:/
The root of the issue is HPLIP uses 'sudo' ins several distros (check base/password.py, AUTH_TYPES list), but doesn't check if the script caller is capable of running 'sudo'. The fix checks if the user is in 'wheel' (Fedora/
With the fix, the prompt contains username which has the correct permissions to do the trick:
1) if caller is sudoer, use its username
2) if caller isn't sudoer, use root
Would you mind adding the fix into HPLIP project?
Note: the further fix for 2) would be to have an option to set superusers, not just root, but it will need more changes in the code. Please let me know if you want a continuation of the fix.
Hi,
Thanks for bringing this to our attention.
We will include your patch in our next release.