From patchwork Sat Mar 18 09:49:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sergey Trofimov X-Patchwork-Id: 48088 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 BA6EF16EC7; Sat, 18 Mar 2023 09:50:29 +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=ham 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 0879D16E9E for ; Sat, 18 Mar 2023 09:50:26 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pdTCP-0004fC-4Z; Sat, 18 Mar 2023 05:50: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 1pdTCM-0004ex-Jg for guix-patches@gnu.org; Sat, 18 Mar 2023 05:50:03 -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 1pdTCM-0002vE-79 for guix-patches@gnu.org; Sat, 18 Mar 2023 05:50:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pdTCM-0000zx-0z for guix-patches@gnu.org; Sat, 18 Mar 2023 05:50:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62251] [PATCH v1] gnu: Add physlock. References: <20230318082048.4296-1-sarg@sarg.org.ru> In-Reply-To: <20230318082048.4296-1-sarg@sarg.org.ru> Resent-From: Sergey Trofimov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sat, 18 Mar 2023 09:50:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62251 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62251@debbugs.gnu.org Cc: Sergey Trofimov Received: via spool by 62251-submit@debbugs.gnu.org id=B62251.16791329923816 (code B ref 62251); Sat, 18 Mar 2023 09:50:01 +0000 Received: (at 62251) by debbugs.gnu.org; 18 Mar 2023 09:49:52 +0000 Received: from localhost ([127.0.0.1]:46228 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdTCB-0000zU-Jq for submit@debbugs.gnu.org; Sat, 18 Mar 2023 05:49:51 -0400 Received: from mail-ed1-f45.google.com ([209.85.208.45]:37694) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pdTC7-0000zC-VS for 62251@debbugs.gnu.org; Sat, 18 Mar 2023 05:49:49 -0400 Received: by mail-ed1-f45.google.com with SMTP id z21so29196534edb.4 for <62251@debbugs.gnu.org>; Sat, 18 Mar 2023 02:49:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sarg.org.ru; s=google; t=1679132982; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=myUa0NFjTgaXHfZzIP/jM7XCA5kslMvNdSnbNbDyLCU=; b=ipmpNYiQtf2pUTL2Y03sOlaa01OxVWGZlTVoQ6DdiZRojjZt/iUKoSha+XGV/+O8Sp yIAs/HHy5Zt8z0Vf/pnFPbYr6QNLyNiFsJeS6FbOauqfGvzMQ+WyesdjAAY2d0Yh3XsH cgMHa1+iULLh4zfTvrvgcN/YL7Hzw/RtfsuoA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1679132982; 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=myUa0NFjTgaXHfZzIP/jM7XCA5kslMvNdSnbNbDyLCU=; b=ZN2XggcLmgkpwxP+SQe8CUkvBuoeNcOuaBlSLSV6I1HkjPzCc1zishh/IAM8spQvlj 1D/8qZSxfV1kWwRMU8kB4H9qgsEMpD6e3+NFk/vDsii3a5xk2aJ+35hj0GLF+Knlx/vj xcDbE7Mw97JGMRwB+lfZpddQ91K0BhZGwpA4dgjOx2DUMGdwkKist0X9eIHmlhf2wNI+ syE0qqwUSAKc7jJtVqQvGUDfiC8TzatD4rVYDnSMp/nis1ZH6thiAFRKJCHPfHQPY89G bkJfr/PIjAXoEORjBBezfthooHGIKfnWV8cGemX+tiHt/t0vEVtt4VDRk6GEZIhueCXu J8gQ== X-Gm-Message-State: AO0yUKVZYdtkP9mf6klQUQuFozzcMNaGklNqmBC4+5l58n7MdtPUrAi4 gId9KU6Rq9Ne16hAwahNL0VrQaDUwdosSi+F+Fo= X-Google-Smtp-Source: AK7set//UQwoztEa5w7iqI0/H7ZSQTTMKL7mZEnte007vwP0K2Q7X9Di6RA0E2Vuuk5xrpy+firWOg== X-Received: by 2002:a05:6402:48a:b0:4ac:bd84:43d8 with SMTP id k10-20020a056402048a00b004acbd8443d8mr5594771edv.8.1679132981802; Sat, 18 Mar 2023 02:49:41 -0700 (PDT) Received: from localhost ([95.168.147.255]) by smtp.gmail.com with ESMTPSA id m17-20020a50d7d1000000b004fc537aec3csm2156910edj.74.2023.03.18.02.49.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 18 Mar 2023 02:49:41 -0700 (PDT) From: Sergey Trofimov Date: Sat, 18 Mar 2023 10:49:47 +0100 Message-Id: <20230318094947.25922-1-sarg@sarg.org.ru> X-Mailer: git-send-email 2.39.2 MIME-Version: 1.0 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 | 47 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index 308fa131d6..66e1a5d340 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -2314,6 +2314,53 @@ (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 + (list #: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: +@enumerate +@item Querying elogind(8) +@item Searching the utmp file for an entry whose ut_line field is the base name of +the active tty device file +@item Using the owner of the active tty device file typically set by login(1) +@end enumerate") + (home-page "https://github.com/xyb3rt/physlock") + (license license:gpl2))) + (define-public python-pyperclip (package (name "python-pyperclip")