FolkComputer / folk

🎁 Physical computing system.
https://folk.computer
Apache License 2.0
75 stars 4 forks source link

Keymap requires passwordless sudo #157

Closed osnr closed 2 months ago

osnr commented 2 months ago

it runs sudo loadkeys, sudo dumpkeys, etc

s-ol commented 2 months ago

Oh, I just realized that at least on Arch the sudo can be dropped if the user is in the tty group. That grants rw access to /dev/tty*, which are in the list of console devices kbd attempts to open:

https://git.kernel.org/pub/scm/linux/kernel/git/legion/kbd.git/tree/src/libcommon/getfd.c#n60

s-ol commented 2 months ago

Debian also has this group: https://wiki.debian.org/SystemGroups#Other_System_Groups

so probably it's enough to drop sudo and add tty to the groups mentioned in the readme and folk-live