From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id IBBbOHEeGmSrDgEASxT56A (envelope-from ) for ; Tue, 21 Mar 2023 22:15:29 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 8I5cOHEeGmSxXgEA9RJhRA (envelope-from ) for ; Tue, 21 Mar 2023 22:15:29 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id A6FF9378F8 for ; Tue, 21 Mar 2023 22:15:29 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pejJw-0007AT-Id; Tue, 21 Mar 2023 17:15:04 -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 1pejJu-0007A0-Ht for guix-patches@gnu.org; Tue, 21 Mar 2023 17:15: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 1pejJu-0004d1-74 for guix-patches@gnu.org; Tue, 21 Mar 2023 17:15:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pejJu-0002bV-3D for guix-patches@gnu.org; Tue, 21 Mar 2023 17:15:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#62357] [PATCH] services: base: add pam-mount-volume support for greetd Resent-From: Brian Cully Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 Mar 2023 21:15:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 62357 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62357@debbugs.gnu.org Cc: Brian Cully X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16794332639928 (code B ref -1); Tue, 21 Mar 2023 21:15:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 Mar 2023 21:14:23 +0000 Received: from localhost ([127.0.0.1]:60996 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pejJH-0002a4-A8 for submit@debbugs.gnu.org; Tue, 21 Mar 2023 17:14:23 -0400 Received: from lists.gnu.org ([209.51.188.17]:40044) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pejJG-0002Zx-8w for submit@debbugs.gnu.org; Tue, 21 Mar 2023 17:14:22 -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 1pejJG-0006xk-2B for guix-patches@gnu.org; Tue, 21 Mar 2023 17:14:22 -0400 Received: from coleridge.kublai.com ([166.84.7.167] helo=mail.spork.org) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pejJB-0004Wa-Rf for guix-patches@gnu.org; Tue, 21 Mar 2023 17:14:21 -0400 Received: from psyduck (ool-18b8e9e7.dyn.optonline.net [24.184.233.231]) by mail.spork.org (Postfix) with ESMTPSA id 0EFA995A3; Tue, 21 Mar 2023 17:14:12 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=spork.org; s=dkim; t=1679433255; bh=cFArseE1ZzbIEVe/kmF3TQvb4SSngJJRf/MCAbB7yRo=; h=References:From:To:Cc:Subject:Date:In-reply-to; b=Gw4IoilNE8iMLKQ2Z3+oRylQLUkm1g1C9vF83dkxdxS3UHq17xAiFOli5Ms9AeBFn o5dbqVVWenNmJrpiB1K4MrjySWmIxXlRPCzsk0V1copzHKgZjDZIt2K2KkYpnj9TJk oxiPCiMpzCmiEGrRMp8pRIxRq9kfD9nYcsRuPZLc= References: <3dc92c40bf6940f2453d1912af08c47771dfa42b.1679432782.git.bjc@spork.org> User-agent: mu4e 1.8.13; emacs 28.2 Date: Tue, 21 Mar 2023 17:09:10 -0400 In-reply-to: <3dc92c40bf6940f2453d1912af08c47771dfa42b.1679432782.git.bjc@spork.org> Message-ID: <871qlhbye9.fsf@psyduck.jhoto.kublai.com> MIME-Version: 1.0 Content-Type: text/plain; format=flowed Received-SPF: pass client-ip=166.84.7.167; envelope-from=bjc@spork.org; helo=mail.spork.org X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 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: , Reply-to: Brian Cully X-ACL-Warn: , Brian Cully via Guix-patches From: Brian Cully via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1679433329; a=rsa-sha256; cv=none; b=Ao0bsLABYEklrMqr0UObY/Xs2F5PUNfs2kmGmIL1bt29ixDqiEZvkgPjGznHkGIS2mwFEM TfX09XVgOqU8V10frOGe6hlHbuw7kdB5i7m4/Xo0KeQ6S0R69gadBt8D8A7jPhbaKImKeB kTg+wGUPx5aAIWQyy0HqdnK1dTvhmu0Lmom8s0nIIHmsFMF+rIbNyb/NyQLRje2e9WJlri Bez3g7K5d99QzwSpwML+felYhxIi/++6EL+lWWDi4/AZ0Q5JBogEdNWBQ/S/RrGw8v/FPj rlGTRhD9nMEYvL/zcj2nngfe7AzJwiwbDAqsbx9VgtsRB9yo2SiJljdazmthQQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=Gw4IoilN; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1679433329; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:in-reply-to:in-reply-to:references:references: list-id:list-help:list-unsubscribe:list-subscribe:list-post: dkim-signature; bh=OGaIGWJOiD55IeBAHrbGjtujSVW49rzplpJ02ozLOIU=; b=F1ZAWGlLlZff5gv0+2CEoixx15UimrX1TCpabiUN3WndNjHTzDMzy8N45Zg5oGAHoJy82t 00tr47ngOya/slZU8qL1hy/Qwzu3pOi5JJ8QEKVLV8zQ9LQ38XGFWvZOg95Rcc1FEBUAoU IH5qBDjqRpHQV5Of49Z2HQzSO67XpMdfLEMYikv277jpVuprFkRxj4DWw+5tLBSPWC9+vF Ohb97GkJpIiIYy6DKdT+6NPkrdmfUPSUJebKc4zNUCmUOigy9SMFcGR1W34RZ9Og7EOx4j d6QeddA5mBT8KkXdLD2/GcmvtvjKb/S7ScQPdIM/4gMzuPXyq4ZYztRRnpeWxQ== X-Migadu-Spam-Score: -3.95 X-Spam-Score: -3.95 X-Migadu-Queue-Id: A6FF9378F8 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=spork.org header.s=dkim header.b=Gw4IoilN; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn1.migadu.com X-TUID: dPc9JRE/Djmp Brian Cully writes: > This patch lets users create mounts automatically on login with > the greetd > service by adding `pam-mount-volume' records via the > `extra-pam-mount-volumes' > field of `greetd-configuration'. > > The existing rules for XDG_RUNTIME_DIR have been migrated to > `%base-pam-mount-volumes' and are installed by default. > > * gnu/services/base.scm (): new record > (pam-mount-volume->sxml): new procedure > (%base-pam-mount-volumes): new variable > (greetd-pam-mount-rules): new function > (%greetd-pam-mount-rules): removed variable > (): new field `extra-pam-mount-volumes' I know this patch will need documentation, but I've also assumed there'll be some discussion around whether or not this is the best way to proceed, so I'm delaying writing it until there's consensus. FWIW, the main use-case of this patch, for me, is auto-mounting samba shares from a NAS which requires authentication. By using the PAM mount facility, as long as my local and remote credentials match, everything happens automatically at login without needing to type my password twice, and this lets login scripts use the remote services as well. I'm sure there are countless other ways to use it, but this is mine. It would be nice to have this more generic, since pam-mount isn't specifically tied to greetd, but it seems like greetd is the only thing in Guix that uses it currently, so that's why that's the only hook I've added. I've named the various symbols to express that they belong to PAM, generally, or greetd, specifically. -bjc