From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id uHm3FsUn2mKTKgEAbAwnHQ (envelope-from ) for ; Fri, 22 Jul 2022 06:29:57 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id mCCkFsUn2mL7YwEAauVa8A (envelope-from ) for ; Fri, 22 Jul 2022 06:29:57 +0200 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 A2AB7EC4C for ; Fri, 22 Jul 2022 06:29:56 +0200 (CEST) Received: from localhost ([::1]:51254 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1oEkIV-0002iq-TY for larch@yhetil.org; Fri, 22 Jul 2022 00:29:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46462) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEkGg-0001aA-Dj for guix-patches@gnu.org; Fri, 22 Jul 2022 00:28:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:50046) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1oEkGg-0000kB-4N for guix-patches@gnu.org; Fri, 22 Jul 2022 00:28:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1oEkGf-0000hZ-SS for guix-patches@gnu.org; Fri, 22 Jul 2022 00:28:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#56690] [PATCH] gnu: seatd-service-type: Should use seat group. Resent-From: muradm Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Jul 2022 04:28:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 56690 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 56690@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16584640762683 (code B ref -1); Fri, 22 Jul 2022 04:28:01 +0000 Received: (at submit) by debbugs.gnu.org; 22 Jul 2022 04:27:56 +0000 Received: from localhost ([127.0.0.1]:39795 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEkGa-0000hD-2T for submit@debbugs.gnu.org; Fri, 22 Jul 2022 00:27:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:36756) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1oEkGT-0000gz-Ba for submit@debbugs.gnu.org; Fri, 22 Jul 2022 00:27:54 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:46446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEkGT-0001Rh-6q for guix-patches@gnu.org; Fri, 22 Jul 2022 00:27:49 -0400 Received: from nomad-cl1.staging.muradm.net ([139.162.159.157]:53974 helo=nomad-cl1.muradm.net) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1oEkGR-0000jG-Ec for guix-patches@gnu.org; Fri, 22 Jul 2022 00:27:48 -0400 Received: from localhost ([127.0.0.1]:46674) by nomad-cl1.muradm.net with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1oEkGB-0004es-0q for guix-patches@gnu.org; Fri, 22 Jul 2022 04:27:31 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=muradm.net; s=mail; h=Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date :Subject:To:From:Sender:Reply-To:Cc:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: In-Reply-To:References:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=mua2yXN7R2IhKYYRHZvnL0T33OYicTP8O+SBalav4lM=; b=Ip5YCerk9wtSxrKX433I/btste g0ERbawwBn3Q6irvacTfDQupE2AKBQ/cuMxcPqWtdjnQjttY360sDIFn4ok6M1WWygY9btb34jRmD /q+9nDZNklbyiRAnoZAGjAazzaBvM/x46JmX3sV4vZhUo2+zkq8tHtu/Vvlca17k84uFWMWheFRD8 GY1dGqhd5eXPfpNP1JL/0Hg4kxvXczMnFAXIXQXBUSEC+xoqX/eo0WpSMSYLtMs7xa+PG8o4uys9u 9MmsF3u7LHrqCyex3oF2nL6A6AP2zcC99nLcJN1LNkHZJcrnVpv0qXnYXVs9V/b8YAJ8dxONVX9af x4+WbIBvv9Ngr6sN3+DMMqvw0Rp4uMdyL9pPwpPetnkJaB7ewvGiqfXUPbhCiS7wPefkBpKLZLgmV wbIk6wzTjvmyE1OL2WPfnbrk454e7r36CpJ+cXr/N3BL7bCJJENbAJy0PXyYQjHmIlR7+Tduyq4I8 ZFdX+i0y9glYsni4HEZ6gOmR; Received: from muradm by localhost with local (Exim 4.96) (envelope-from ) id 1oEkGP-0006xV-0J for guix-patches@gnu.org; Fri, 22 Jul 2022 07:27:45 +0300 From: muradm Date: Fri, 22 Jul 2022 07:27:45 +0300 Message-Id: <20220722042745.26745-1-mail@muradm.net> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=139.162.159.157; envelope-from=mail@muradm.net; helo=nomad-cl1.muradm.net 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, T_SCC_BODY_TEXT_LINE=-0.01 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1658464197; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=mua2yXN7R2IhKYYRHZvnL0T33OYicTP8O+SBalav4lM=; b=KvSvd8+04vS3jEZAhFo/eW0bJZSDITXuNoHQh2RYKpsS2Uy7hS1CnMBKwRwQbiSoVik973 ld2dFZcUZdQWQ7VKx2/5ueJPgKUcXO1qCF+gNu3zUKvo55TCHpOeN/RViC0CMFPjKZKYvq EkDKE6YKYXinmBFOF5GxgMuf1XmVZmcHfBEJf4WL6IdimjFwpBj2ip6h72Sz7pnrfL5ybT IXXhM3qkmkO1bRNO3z8EUvYKnmPdP5FPo2Fml3/lut8J8U+WWPs1s35pVyLK6g0t9kBPCO idp5AKV+NnuwJSFo6Varz7QbRDKtZOm0Q6fiLjA8vFYrkZZd8jfrWcr6H0KRSA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1658464197; a=rsa-sha256; cv=none; b=Xgfg6atXZvHJ+o8NeVM8zcZEva59S/AChHJqJbNW4Se06jpT4MHyiyQbLQUo0uZI9O1/61 7HsR2R2JfnXjRqduM9oyjQCOTRmRoBRsfQv5O0mpsN8YXY+emc6nDgU3w46At1Mcr+9aRn XmrPzyxucG27xIFm7K6jOREWXqNkLVp3WFV5+uimzlWoBjPIwydKM/tNpx8tQk3/jBxc8x kzEfdOlxvIgjxBXzAFkP8eDyqYWZ1oL38CLsKVPGXLNeOuH3nKsnNdoYerS/3zllPBuQg8 6ngNBYLo1mm5GillgqtplNUXWKORu0ewTj3b9NpM68DMBfaRqODn1P7dQurfVQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=Ip5YCerk; dmarc=none; 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-Spam-Score: 3.36 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=muradm.net header.s=mail header.b=Ip5YCerk; dmarc=none; 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-Queue-Id: A2AB7EC4C X-Spam-Score: 3.36 X-Migadu-Scanner: scn1.migadu.com X-TUID: /MZhpZW//gZk * gnu/services/desktop.scm (seatd-service-type): Uses "seat" group. [extensions]: Added account-service-type with %seatd-accounts. (%seatd-accounts): List with "seat" group. (): [group] Change default value to "seat". * doc/guix.texi: Mention that users may need to become members of "seat" group and update default value for group field. --- doc/guix.texi | 18 +++++++++++++++++- gnu/services/desktop.scm | 8 ++++++-- 2 files changed, 23 insertions(+), 3 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 3c5864ec1a..750ed9b121 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -23151,6 +23151,22 @@ input), without requiring the applications needing access to be root. %base-services) @end lisp + +Users which are going to interact with @code{seatd} daemon while logged in +should be added to @code{seat} group. For instance: + +@lisp +(user-account + (name "alice") + (group "users") + (supplementary-groups '("wheel" ;allow use of sudo, etc. + "seat" ;interact with seatd + "audio" ;sound card + "video" ;video devices such as webcams + "cdrom")) ;the good ol' CD-ROM + (comment "Bob's sister")) +@end lisp + @end defvr @deftp {Data Type} seatd-configuration @@ -23163,7 +23179,7 @@ The seatd package to use. @item @code{user} (default: @samp{"root"}) User to own the seatd socket. -@item @code{group} (default: @samp{"users"}) +@item @code{group} (default: @samp{"seat"}) Group to own the seatd socket. @item @code{socket} (default: @samp{"/run/seatd.sock"}) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 29a3722f1b..0d7cd71732 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Reza Alizadeh Majd ;;; Copyright © 2021 Brice Waegeneire -;;; Copyright © 2021 muradm +;;; Copyright © 2021, 2022 muradm ;;; ;;; This file is part of GNU Guix. ;;; @@ -1646,7 +1646,7 @@ (define-record-type* seatd-configuration seatd-configuration? (seatd seatd-package (default seatd)) (user seatd-user (default "root")) - (group seatd-group (default "users")) + (group seatd-group (default "seat")) (socket seatd-socket (default "/run/seatd.sock")) (logfile seatd-logfile (default "/var/log/seatd.log")) (loglevel seatd-loglevel (default "info"))) @@ -1670,6 +1670,9 @@ (define (seatd-shepherd-service config) #:log-file #$(seatd-logfile config))) (stop #~(make-kill-destructor))))) +(define %seatd-accounts + (list (user-group (name "seat") (system? #t)))) + (define seatd-environment (match-lambda (($ _ _ _ socket) @@ -1683,6 +1686,7 @@ (define seatd-service-type applications needing access to be root.") (extensions (list + (service-extension account-service-type (const %seatd-accounts)) (service-extension session-environment-service-type seatd-environment) ;; TODO: once cgroups is separate dependency we should not mount it here ;; for now it is mounted here, because elogind mounts it -- 2.36.1