Merge pull request #10425 from acrogenesis/security/root-owned-sleep-hooks

Harden ownership of installed sleep hooks

(cherry picked from commit c82a0837b0)
(cherry picked from commit 3b5f4446f6022ad056fc06d320d157075841cde7)
This commit is contained in:
Ryan Hughes committed 2026-09-07 20:57:03 -04:00
1 parent f94c6db34d
commit 6d327ce83c
8 files changed
+1188 -19

No files matched your search

@@ -3,7 +3,9 @@
# Turn off keyboard backlight before hibernate to prevent hang on power-off.
# The ASUS keyboard controller can block S4 shutdown if LEDs are active.
if [[ $1 == "pre" && $2 == "hibernate" ]]; then
sleep_action=${SYSTEMD_SLEEP_ACTION:-$2}
if [[ $1 == "pre" && $sleep_action == "hibernate" ]]; then
device=""
for candidate in /sys/class/leds/*kbd_backlight*; do
if [[ -e "$candidate" ]]; then