Message ID | c45600de103d560b3487772b103d7e4b@disroot.org |
---|---|
State | New |
Headers |
Return-Path: <guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org> X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id E84CA27BBE9; Wed, 10 Apr 2024 00:59:13 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HTML_MESSAGE,MAILING_LIST_MULTI,SPF_HELO_PASS, URIBL_BLOCKED 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 838DA27BBE2 for <patchwork@mira.cbaines.net>; Wed, 10 Apr 2024 00:59:11 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from <guix-patches-bounces@gnu.org>) id 1ruLMd-0000KT-PY; Tue, 09 Apr 2024 19:58:55 -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 <Debian-debbugs@debbugs.gnu.org>) id 1ruLMc-0000KK-JA for guix-patches@gnu.org; Tue, 09 Apr 2024 19:58:54 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ruLMc-0005hu-B2 for guix-patches@gnu.org; Tue, 09 Apr 2024 19:58:54 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from <Debian-debbugs@debbugs.gnu.org>) id 1ruLMk-0007A8-6e for guix-patches@gnu.org; Tue, 09 Apr 2024 19:59:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#70318] [PATCH] Fix unitentional creation of greeter's home directory Resent-From: lgcoelho@disroot.org Original-Sender: "Debbugs-submit" <debbugs-submit-bounces@debbugs.gnu.org> Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 09 Apr 2024 23:59:01 +0000 Resent-Message-ID: <handler.70318.B.171270710927482@debbugs.gnu.org> Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 70318 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 70318@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.171270710927482 (code B ref -1); Tue, 09 Apr 2024 23:59:01 +0000 Received: (at submit) by debbugs.gnu.org; 9 Apr 2024 23:58:29 +0000 Received: from localhost ([127.0.0.1]:51785 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <debbugs-submit-bounces@debbugs.gnu.org>) id 1ruLMD-00079B-CS for submit@debbugs.gnu.org; Tue, 09 Apr 2024 19:58:29 -0400 Received: from lists.gnu.org ([2001:470:142::17]:50908) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <lgcoelho@disroot.org>) id 1ruLMB-00078y-Pn for submit@debbugs.gnu.org; Tue, 09 Apr 2024 19:58:28 -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 <lgcoelho@disroot.org>) id 1ruLLu-0000Gn-5D for guix-patches@gnu.org; Tue, 09 Apr 2024 19:58:11 -0400 Received: from layka.disroot.org ([178.21.23.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <lgcoelho@disroot.org>) id 1ruLLr-0005es-99 for guix-patches@gnu.org; Tue, 09 Apr 2024 19:58:09 -0400 X-Virus-Scanned: SPAM Filter at disroot.org MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=disroot.org; s=mail; t=1712707081; bh=I7VM2lpuGxyI+MrAcf57f00w7yUNbb46ioWSO9AE/Z8=; h=Date:From:To:Subject; b=REWZuqI2Lj7/DuF5QnpLOX1w0AC8kLeHqm2qNVpBQQs2fwh2HvoSN5WE0aYiJ8ArS CxE+Nc2mh8vVSQoIEPYbhk32bKOXm2rfug9Ly5XbLnPclY6xioArKMRzLbXG0CuQid kuvkufySr/+3jeO4AdwAKJUo2mMdjapknemHHwZGy0I2fReiS74W7f1rOK+cQVjdVb gyWwbfZEdestgCNcY/wZE/yNALQPhB3f1ug09qxbusrh+z50RJKJAK4zONQCjIE4EF zVsJHhx+Dt++EkUR8N0x9f8GHw8c6wp9UdeAy4rwUmvkzM9oPXKLw43Q/pkzj6pUdq ggGOUpgI8epaw== Date: Wed, 10 Apr 2024 01:58:01 +0200 Message-ID: <c45600de103d560b3487772b103d7e4b@disroot.org> X-Sender: lgcoelho@disroot.org Content-Type: multipart/mixed; boundary="=_b2be8a9c679be404e8cacd0094788640" Received-SPF: pass client-ip=178.21.23.139; envelope-from=lgcoelho@disroot.org; helo=layka.disroot.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, HTML_MESSAGE=0.001, 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: <guix-patches.gnu.org> List-Unsubscribe: <https://lists.gnu.org/mailman/options/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=unsubscribe> List-Archive: <https://lists.gnu.org/archive/html/guix-patches> List-Post: <mailto:guix-patches@gnu.org> List-Help: <mailto:guix-patches-request@gnu.org?subject=help> List-Subscribe: <https://lists.gnu.org/mailman/listinfo/guix-patches>, <mailto:guix-patches-request@gnu.org?subject=subscribe> Reply-to: lgcoelho@disroot.org X-ACL-Warn: , lgcoelho--- via Guix-patches <guix-patches@gnu.org> From: lgcoelho--- via Guix-patches via <guix-patches@gnu.org> 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 |
Series |
[bug#70318] Fix unitentional creation of greeter's home directory
|
|
Commit Message
tusharhero--- via Guix-patches via
April 9, 2024, 11:58 p.m. UTC
This patch adresses the unintentional creation of the greeter's home directory when using the greetd-service.
Comments
This may break greeters which are more complex than agreety. For instance, gtkgreet/wlgreet run under sway. One of subdependencies is mesa, which will want to write shader caches somewhere. Another one is fontconfig, doing similar thing for fonts. There may be others, which hard to track and tune. Some could be impossible to tune at all. lgcoelho@disroot.org writes: > This patch adresses the unintentional creation of the greeter's > home > directory when using the greetd-service. > > [4. text/x-diff; > 0001-services-base-Fix-unintentional-creation-of-greeter-.patch]...
On 2025-01-03 21:05, muradm wrote: > This may break greeters which are more complex than agreety. For > instance, gtkgreet/wlgreet run under sway. One of subdependencies > is mesa, which will want to write shader caches somewhere. Another > one is fontconfig, doing similar thing for fonts. There may be > others, which hard to track and tune. Some could be impossible to > tune at all. Then maybe we can make it conditional on agreety? If all greetd-configuration-terminals have their greet-default-session-command being an greetd-agreety-session?, we could set it to #f. Something like this could work: (create-home-directory? (not (every greetd-agreety-session? (map greetd-default-session-command (greetd-configuration-terminals config))))) WDYT?
Nicolas Graves <ngraves@ngraves.fr> writes: > On 2025-01-03 21:05, muradm wrote: > >> This may break greeters which are more complex than agreety. >> For >> instance, gtkgreet/wlgreet run under sway. One of >> subdependencies >> is mesa, which will want to write shader caches somewhere. >> Another >> one is fontconfig, doing similar thing for fonts. There may be >> others, which hard to track and tune. Some could be impossible >> to >> tune at all. > > Then maybe we can make it conditional on agreety? > > If all greetd-configuration-terminals have their > greet-default-session-command being an greetd-agreety-session?, > we could > set it to #f. > > Something like this could work: > (create-home-directory? (not (every greetd-agreety-session? (map > greetd-default-session-command (greetd-configuration-terminals > config))))) > > WDYT? 2 of 3 greeters needs home. With improvements implemented by 75270 `greetd-terminal-configuration` is detached from details of its `default-session-command`. By this, any user can workout its greeter. If we hardcode implementation of greeter in terminal user may loose such flexibility. Also once you implement such condition, you will have to maintain with any other greeter added in the future. One way would be to carry this flag into `greetd-configuration`, IMHO will uneccessarily complicate the things. Is there any good reason for doing that? What is the problem with having home directory for greeter user?
muradm <mail@muradm.net> writes: >> >> Then maybe we can make it conditional on agreety? >> >> If all greetd-configuration-terminals have their >> greet-default-session-command being an greetd-agreety-session?, >> we >> could >> set it to #f. >> >> Something like this could work: >> (create-home-directory? (not (every greetd-agreety-session? >> (map >> greetd-default-session-command (greetd-configuration-terminals >> config))))) >> >> WDYT? > > 2 of 3 greeters needs home. With improvements implemented by > 75270 > `greetd-terminal-configuration` is detached from details of its > `default-session-command`. By this, any user can workout its > greeter. > If we hardcode implementation of greeter in terminal user may > loose > such flexibility. Also once you implement such condition, you > will > have to maintain with any other greeter added in the future. > > One way would be to carry this flag into `greetd-configuration`, > IMHO > will uneccessarily complicate the things. Is there any good > reason for > doing that? > > What is the problem with having home directory for greeter user? After some more meditation, I remembered that originally I also did not like idea of having extra user home directory and considering changes introduced by #75270, it became obvious that sway specific environment can be setup within `make-greetd-sway-greeter-command`. Further greeters may either improve on it, or provide their own entry point commands as they see fit. v2 of 75270 includes this change, and adjusts the environment accordingly. This issue can be closed in favor if 75270.
From 4be55c2b63c050ae837e9afa7969cfb3ee8df1e5 Mon Sep 17 00:00:00 2001 From: Luis Guilherme Coelho <lgcoelho@disroot.org> Date: Tue, 9 Apr 2024 20:38:33 -0300 Subject: [PATCH] services: base: Fix unintentional creation of greeter's home directory * gnu/services/base.scm (greetd-account) [create-home-directory?]: Set to false. --- gnu/services/base.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 3f912225a0..b39b8418ed 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2022 Justin Veilleux <terramorpha@cock.li> ;;; Copyright © 2022 ( <paren@disroot.org> ;;; Copyright © 2023 Bruno Victal <mirai@makinata.eu> +;;; Copyright © 2024 Luis Guilherme Coelho <lgcoelho@disroot.org> ;;; ;;; This file is part of GNU Guix. ;;; @@ -3481,6 +3482,7 @@ (define (greetd-accounts config) (name "greeter") (group "greeter") (supplementary-groups (greetd-greeter-supplementary-groups config)) + (create-home-directory? #f) (system? #t)))) (define (make-greetd-pam-mount-conf-file config) -- 2.41.0