Scope asdcontrol's passwordless sudo grant (#242)

Ship the least-privilege rule with asdcontrol so authorization follows the package lifecycle. Install it after older broad rules for safe staggered upgrades.
This commit is contained in:
Ryan Hughes authored and GitHub committed 2026-08-30 12:59:21 -04:00
1 parent cf39173553
commit 30d03c4d26
3 files changed
+14 -22

No files matched your search

+4
View File
@@ -0,0 +1,4 @@
# Deny arbitrary asdcontrol arguments before allowing only the operations Omarchy uses.
# Keep this filename late-sorting so it also overrides stale broader grants.
ALL ALL=(ALL) !/usr/bin/asdcontrol
%wheel ALL=(root) NOPASSWD: /usr/bin/asdcontrol ^--detect (/dev/(usb/)?hiddev[0-9]+)( /dev/(usb/)?hiddev[0-9]+)*$, /usr/bin/asdcontrol ^/dev/(usb/)?hiddev[0-9]+$, /usr/bin/asdcontrol ^/dev/(usb/)?hiddev[0-9]+ -- [+-]?[0-9]{1,3}%$