Rely on uaccess to control device access #297
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
The udev rules currently make supported device nodes world-readable and writable, which means that any process on the system can read traffic from keyboards including passwords etc. To avoid this, while still allowing the "controlling" user to run g810-led without being root, this patch adds a uaccess tag; this ensures that the user at the console has write access to the devices. The mode is also changed to 660 to ensure that existing device nodes are fixed on upgrade.
Thanks to Xavi Drudis Ferran for bringing this to my attention.
Fixes: #293
Signed-off-by: Stephen Kitt steve@sk2.org