From patchwork Wed Sep 15 16:29:54 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: muradm X-Patchwork-Id: 32865 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 768B027BBE3; Wed, 15 Sep 2021 17:35:09 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_MSPIKE_H2,SPF_HELO_PASS,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.2 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 412F527BBE1 for ; Wed, 15 Sep 2021 17:35:09 +0100 (BST) Received: from localhost ([::1]:44254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mQXsK-0003Fl-5c for patchwork@mira.cbaines.net; Wed, 15 Sep 2021 12:35:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:59684) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mQXoN-0003ee-7h for guix-patches@gnu.org; Wed, 15 Sep 2021 12:31:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:41540) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mQXoM-0004na-ST for guix-patches@gnu.org; Wed, 15 Sep 2021 12:31:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mQXoM-0003Dw-OX for guix-patches@gnu.org; Wed, 15 Sep 2021 12:31:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49969] [PATCH v7 3/7] gnu: admin: Add greetd-pam-mount. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 15 Sep 2021 16:31:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49969@debbugs.gnu.org Received: via spool by 49969-submit@debbugs.gnu.org id=B49969.163172341112163 (code B ref 49969); Wed, 15 Sep 2021 16:31:02 +0000 Received: (at 49969) by debbugs.gnu.org; 15 Sep 2021 16:30:11 +0000 Received: from localhost ([127.0.0.1]:53061 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQXnX-00039z-1j for submit@debbugs.gnu.org; Wed, 15 Sep 2021 12:30:11 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:58054 helo=nomad-cl1.muradm.net) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mQXnR-00039X-Bo for 49969@debbugs.gnu.org; Wed, 15 Sep 2021 12:30:05 -0400 Received: from [176.234.10.27] (port=7488 helo=localhost) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1mQXnR-0000NN-LM for 49969@debbugs.gnu.org; Wed, 15 Sep 2021 16:30:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:To:From:Sender:Reply-To:Cc:Content-Type:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=sqZE6qFYalZFifHvF/PNFwJBO4Fqo2jT0XQxlzCwyVY=; b=CH+PzHcJ2cZ8jKU1PmYVdFW/mb OYJ7T1cg5vdYcvPlTL/Y0Q6pDvzU8yRZlnaFpAOsCUg1ZiFPUMpk0KfUNADVFb/E6JjzY3gy56AF2 AJBmO8WHXHF6B62u/HIYCJ/qWYf7MCL0i131JFSsnQZU4ylOK206hBecTz4KdZNA2JtwbUq+UbaV0 3Wdgg2C4elCOqWFFAzVWR1Ye9c6UyTc5bdXSv4qZsSItgMUQRQx2dPn7zhSsuOZ1Zz77K9pZj/lpA pv0t25EfyriL1a57PZ59uPhd5rR+F7Ios3IaPROqnUyjb7rxwLBOlhmVgPHs++zRng3AtnhvtDMp2 1soJE8Z7xwHo8bC42FvKjhgkBB4KelxtkSV62usgmi0Mv65hvLf1Yge5t1JsWzOS0QXivp1gnqe7w LuPP6EZyGAV0FG9DV/Af4aGfEvqBLkFbahSPhXa6VTqHSGKgz3zhqL1SUqPvElxv/KhJ7YnMpl2ik 8AZNNseAlHwvjqLlPWN47Q25; Received: from muradm by localhost with local (Exim 4.94.2) (envelope-from ) id 1mQXnP-0007OX-3O for 49969@debbugs.gnu.org; Wed, 15 Sep 2021 19:30:03 +0300 From: muradm Date: Wed, 15 Sep 2021 19:29:54 +0300 Message-Id: <20210915162958.28398-4-mail@muradm.net> X-Mailer: git-send-email 2.33.0 In-Reply-To: <20210915162958.28398-1-mail@muradm.net> References: <20210906152641.11020-1-mail@muradm.net> <20210915162958.28398-1-mail@muradm.net> 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/admin.scm (greetd-pam-mount): New variable --- gnu/packages/admin.scm | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index bef0ca3745..e46d21844b 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -4892,3 +4892,35 @@ If you can run it from your shell in a TTY, greetd can start it. If it can be taught to speak a simple JSON-based IPC protocol, then it can be a greeter.") (license license:gpl3+))) + +(define-public greetd-pam-mount + (package + (inherit pam-mount) + (name "greetd-pam-mount") + (arguments + (substitute-keyword-arguments (package-arguments pam-mount) + ((#:configure-flags flags ''()) + `(cons* "--with-rundir=/run/greetd" ,flags)) + ((#:phases phases) + `(modify-phases ,phases + (add-after 'unpack 'patch-config-file-name + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "src/pam_mount.c" + ((".*define CONFIGFILE .*$") + "#define CONFIGFILE \"/etc/security/greetd_pam_mount.conf.xml\"\n") + (("pam_mount_config") "greetd_pam_mount_config") + (("pam_mount_system_authtok") "greetd_pam_mount_system_authtok")))))))) + (synopsis "pam-mount specifically compiled for use with greetd") + (description + "Pam-mount is a PAM module that can mount volumes when a user logs in. +It supports mounting local filesystems of any kind the normal mount utility +supports. It can also mount encrypted LUKS volumes using the password +supplied by the user when logging in. + +This package inherits pam-mount in the way that it is compiled specifically +for use with greetd daemon. It uses different configuration location and +name space for storing data in PAM. + +greetd-pam-mount is used in configuration of greetd to provide +auto-(mounting/unmounting) of XDG_RUNTIME_DIR in the way that it will not +interfere with default pam-mount configuration.")))