From d1bedbc3c850cf0a60b182999c229079bad9cd99 Mon Sep 17 00:00:00 2001 From: Lu Hui Date: Sat, 17 Sep 2022 20:10:34 +0800 Subject: [PATCH] gnu: hikari: only allow use setuid hikari-unlocker. * gnu/packages/wm.scm (hikari) [phases]{force-use-setuid-unlocker}: replace "sh -c hikari-unlocker" to "/run/setuid-programs/hikari-unlocker" --- gnu/packages/wm.scm | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/gnu/packages/wm.scm b/gnu/packages/wm.scm index f329020eb4..d0586efb63 100644 --- a/gnu/packages/wm.scm +++ b/gnu/packages/wm.scm @@ -57,6 +57,7 @@ ;;; Copyright © 2022 muradm ;;; Copyright © 2022 Elais Player ;;; Copyright © 2022 Trevor Richards +;;; Copyright © 2022 LuHui ;;; ;;; This file is part of GNU Guix. ;;; @@ -2632,6 +2633,11 @@ (define-public hikari "WITH_VIRTUAL_INPUT=YES") #:phases (modify-phases %standard-phases + (add-after 'unpack 'force-use-setuid-unlocker + (lambda _ + (substitute* "src/lock_mode.c" + (("\"/bin/sh\", \"/bin/sh\", \"-c\", \"hikari-unlocker\"") + "\"/run/setuid-programs/hikari-unlocker\"")))) (delete 'configure) (replace 'build (lambda* (#:key inputs outputs make-flags #:allow-other-keys) @@ -2643,7 +2649,11 @@ (define-public hikari (synopsis "Stacking Wayland compositor with tiling capabilities") (description "Hikari is a stacking Wayland compositor with additional tiling -capabilities. It is heavily inspired by the Calm Window manager(cwm).") +capabilities. It is heavily inspired by the Calm Window manager(cwm). + +You need add following line to your system configuration to make unlocker working: + + (screen-locker-service-type hikari \"hikari-unlocker\")") (license license:bsd-2))) (define-public devour -- 2.37.3