[Feature] Force second device for sudo
Understood
Yes, this is not a bug report / support request
Text
When #31 is done, it would be possible to implement a way to force a second device for sudo usage.
Example usecase: Office, School etc having usb keys for each user. Each user sometimes need to use sudo, like for example installing software. Admin could then visit the users desk, plug the sudo stick in, user runs command(s), admin walks away with his stick again. Or a shared family computer etc.
How to implement:
-
<device>in<user>should have an attributesudo, if present require this device for su(do) request
todo: check if this should be used for polkit or like that.
Better idea: <option id="sudo_device">DeviceName</option> in <user> or global.
if global it would basically disallow sudo for users not having the sudo device configured though.
Or put a <device> in <service id="sudo"> ?
Guess this is the best idea, because it doesn't restrict the feature to sudo
todo: [ ] Modifiy opts->device_list to have sudo attribute [ ] Modifiy pusb_device_connected to only iterate devices having the attribute