From patchwork Sat Mar 18 08:20:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 48087 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id F311E16EE4; Sat, 18 Mar 2023 08:21:25 +0000 (GMT) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.7 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,URIBL_BLOCKED, URIBL_SBL_A autolearn=unavailable autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id E7BEA1669B for ; Sat, 18 Mar 2023 08:21:23 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdRoH-0004iB-TL; Sat, 18 Mar 2023 04:21:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdRoF-0004i1-KB for guix-patches@gnu.org; Sat, 18 Mar 2023 04:21:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pdRoF-0003Mz-CN for guix-patches@gnu.org; Sat, 18 Mar 2023 04:21:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pdRoE-0004dQ-7Z for guix-patches@gnu.org; Sat, 18 Mar 2023 04:21:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62251] [PATCH] gnu: Add physlock. Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Mar 2023 08:21:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 62251 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62251@debbugs.gnu.org Cc: Sergey Trofimov X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.167912763817760 (code B ref -1); Sat, 18 Mar 2023 08:21:02 +0000 Received: (at submit) by debbugs.gnu.org; 18 Mar 2023 08:20:38 +0000 Received: from localhost ([127.0.0.1]:46134 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdRnq-0004cN-HG for submit@debbugs.gnu.org; Sat, 18 Mar 2023 04:20:38 -0400 Received: from lists.gnu.org ([209.51.188.17]:40470) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdRnp-0004cG-1v for submit@debbugs.gnu.org; Sat, 18 Mar 2023 04:20:37 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pdRno-0004ah-JF for guix-patches@gnu.org; Sat, 18 Mar 2023 04:20:36 -0400 Received: from mail-ed1-x52b.google.com ([2a00:1450:4864:20::52b]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pdRnm-0003B2-G1 for guix-patches@gnu.org; Sat, 18 Mar 2023 04:20:36 -0400 Received: by mail-ed1-x52b.google.com with SMTP id eh3so28632704edb.11 for ; Sat, 18 Mar 2023 01:20:32 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1679127630; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=bQXxAd4kghJxsV0mkL+JQ9g0RRsxVHAn0ic/Y1jsvFo=; b=jBqqJq9sTvyeFqgREeGEXTUR7hlSV/4rAD9w6F1cLMcovUZgYx8Ei5KS4mTkNyBtMa 6KfU0e2j+X9imFxiQIV07W6M4F1LQHaBDwx7eEqI1+Dz0ZAYz5l9FxQ4LZIKE40wg3Rx 8jnTDz2Bv/L/2j5dwAq0E5sNKoMONs65EYcaU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679127630; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=bQXxAd4kghJxsV0mkL+JQ9g0RRsxVHAn0ic/Y1jsvFo=; b=Ftfh1lo3a8fsBsdV/Xzz7VbKkA6ramybzhHku8wFzgSS1X24DpsZHzee5H4M3Zrzo4 wgikCXm5YW2Xq8tM74RAnHR/mUcwWiBkcVGEmqKAoWS2ytO4SFhsYKToYDBvk4YuogKR KspXcLJxAI6D1rIqFHRDr2VZfqfD+MLlYMWKhSQl2dqYOcXsQ6uVgvdnPHi4Vo0zibEg ju3k6yDlxexJtgmqqYRD/+mdloadg+G3vc6h3VPhK5jgEGZbEF8nXinmnuyaLe4p5B1f GtfuceUI3hFGszkTlyIqpPeBeSfq3RSQs/cMfXPNgTRfQQB8ZRucDiZOFHUd+BssEt/M 9u4g== X-Gm-Message-State: AO0yUKWQhbA1Mz/qBPD+VWfg1Wsc2jeVhpUgNz03NPlaamLHLnZ6fhbs 1N887X2ynOce1JgCXUHZe5P10VeYp3sn/TCqQiY= X-Google-Smtp-Source: AK7set/eoXpoMN7uqbkghtcmdIKcf5TFHl7Ykasba2ah9hmaRdmxvs4FcMTF9zWRm2TONRsE0GSSIQ== X-Received: by 2002:a17:906:3f94:b0:92d:2119:65cf with SMTP id b20-20020a1709063f9400b0092d211965cfmr1979114ejj.74.1679127630461; Sat, 18 Mar 2023 01:20:30 -0700 (PDT) Received: from localhost ([95.168.147.255]) by smtp.gmail.com with ESMTPSA id p15-20020a17090635cf00b009307ddcd13esm1888980ejb.119.2023.03.18.01.20.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Mar 2023 01:20:30 -0700 (PDT) From: Sergey Trofimov Date: Sat, 18 Mar 2023 09:20:48 +0100 Message-Id: <20230318082048.4296-1-sarg@sarg.org.ru> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 Received-SPF: none client-ip=2a00:1450:4864:20::52b; envelope-from=sarg@sarg.org.ru; helo=mail-ed1-x52b.google.com X-Spam_score_int: -19 X-Spam_score: -2.0 X-Spam_bar: -- X-Spam_report: (-2.0 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_NONE=0.001, URIBL_SBL_A=0.1 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches * gnu/packages/xdisorg.scm (physlock): New variable. --- gnu/packages/xdisorg.scm | 45 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 45 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 308fa131d6..6c6b6b2c90 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -2314,6 +2314,51 @@ (define-public xss-lock (home-page "https://bitbucket.org/raymonad/xss-lock") (license license:expat)))) +(define-public physlock + (package + (name "physlock") + (version "13") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/xyb3rt/physlock") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1mz4xxjip5ldiw9jgfq9zvqb6w10bcjfx6939w1appqg8f521a7s")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f ;no tests + #:phases + (modify-phases %standard-phases + (delete 'configure) + + (add-after 'unpack 'fix-makefile + (lambda _ + (substitute* "Makefile" (("-m 4755 -o root -g root") ""))))) + + #:make-flags + (list "HAVE_SYSTEMD=0" "HAVE_ELOGIND=1" + (string-append "CC=" ,(cc-for-target)) + (string-append "PREFIX=" %output)))) + (native-inputs (list linux-pam elogind)) + (synopsis + "Control physical access to a linux computer by locking all of its +virtual terminals.") + (description + "physlock only allows the user of the active session (the user logged in +on the foreground virtual terminal) and the root user to unlock the computer +and uses PAM for authentication. + +physlock uses 3 mechanisms to detect the user of the active session: +- Querying elogind(8) +- Searching the utmp file for an entry whose ut_line field is the base name of +the active tty device file +- Using the owner of the active tty device file typically set by login(1)") + (home-page "https://github.com/xyb3rt/physlock") + (license license:gpl2))) + (define-public python-pyperclip (package (name "python-pyperclip")