From patchwork Tue May 21 13:21:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reza Alizadeh Majd X-Patchwork-Id: 14044 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 BBCBA17036; Tue, 21 May 2019 14:22:08 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 2323317034 for ; Tue, 21 May 2019 14:22:08 +0100 (BST) Received: from localhost ([127.0.0.1]:53777 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4iV-0004HD-Km for patchwork@mira.cbaines.net; Tue, 21 May 2019 09:22:07 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56295) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4iR-0004EI-Vf for guix-patches@gnu.org; Tue, 21 May 2019 09:22:05 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT4iR-0001EX-05 for guix-patches@gnu.org; Tue, 21 May 2019 09:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hT4iQ-0001EF-TR for guix-patches@gnu.org; Tue, 21 May 2019 09:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hT4iQ-0003BX-PF for guix-patches@gnu.org; Tue, 21 May 2019 09:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35845] [PATCH 1/2] services: sddm: fix root login failure issue. Resent-From: Reza Alizadeh Majd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 May 2019 13:22:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35845 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35845@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155844489112167 (code B ref -1); Tue, 21 May 2019 13:22:02 +0000 Received: (at submit) by debbugs.gnu.org; 21 May 2019 13:21:31 +0000 Received: from localhost ([127.0.0.1]:38985 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT4hv-0003AB-8p for submit@debbugs.gnu.org; Tue, 21 May 2019 09:21:31 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41794) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT4hr-00039g-Ji for submit@debbugs.gnu.org; Tue, 21 May 2019 09:21:27 -0400 Received: from lists.gnu.org ([209.51.188.17]:55005) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hT4hl-00006b-8b for submit@debbugs.gnu.org; Tue, 21 May 2019 09:21:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4hk-0003iw-6L for guix-patches@gnu.org; Tue, 21 May 2019 09:21:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT4hi-0008U3-QA for guix-patches@gnu.org; Tue, 21 May 2019 09:21:20 -0400 Received: from [5.230.148.152] (port=60986 helo=Rezas-MacBook-Pro-2.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4hh-0008NV-He for guix-patches@gnu.org; Tue, 21 May 2019 09:21:17 -0400 Received: by Rezas-MacBook-Pro-2.local (Postfix, from userid 501) id D2594101B313B8; Tue, 21 May 2019 17:51:12 +0430 (+0430) From: Reza Alizadeh Majd Date: Tue, 21 May 2019 17:51:09 +0430 Message-Id: <20190521132110.85299-1-r.majd@pantherx.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Mac OS X [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Reza Alizadeh Majd Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches * gnu/services/sddm.scm (sdm-pam-service): set uid from config. (sdm-autologin-pam-service): set uid from config. (sdm-pam-services): pass sddm-configuration to sddm-pam-service and sddm-autologin-pam-service --- gnu/services/sddm.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/gnu/services/sddm.scm b/gnu/services/sddm.scm index b433c59e12..b0e6d40260 100644 --- a/gnu/services/sddm.scm +++ b/gnu/services/sddm.scm @@ -175,7 +175,7 @@ Relogin=" (if (sddm-configuration-relogin? config) (define (sddm-etc-service config) (list `("sddm.conf" ,(sddm-configuration-file config)))) -(define (sddm-pam-service) +(define (sddm-pam-service config) "Return a PAM service for @command{sddm}." (pam-service (name "sddm") @@ -190,7 +190,9 @@ Relogin=" (if (sddm-configuration-relogin? config) (pam-entry (control "required") (module "pam_succeed_if.so") - (arguments (list "uid >= 1000" "quiet"))) + (arguments (list (string-append "uid >= " + (number->string (sddm-configuration-minimum-uid config))) + "quiet"))) ;; should be factored out into system-auth (pam-entry (control "required") @@ -249,7 +251,7 @@ Relogin=" (if (sddm-configuration-relogin? config) (control "required") (module "pam_unix.so")))))) -(define (sddm-autologin-pam-service) +(define (sddm-autologin-pam-service config) "Return a PAM service for @command{sddm-autologin}" (pam-service (name "sddm-autologin") @@ -261,7 +263,9 @@ Relogin=" (if (sddm-configuration-relogin? config) (pam-entry (control "required") (module "pam_succeed_if.so") - (arguments (list "uid >= 1000" "quiet"))) + (arguments (list (string-append "uid >= " + (number->string (sddm-configuration-minimum-uid config))) + "quiet"))) (pam-entry (control "required") (module "pam_permit.so")))) @@ -282,9 +286,9 @@ Relogin=" (if (sddm-configuration-relogin? config) (module "sddm")))))) (define (sddm-pam-services config) - (list (sddm-pam-service) + (list (sddm-pam-service config) (sddm-greeter-pam-service) - (sddm-autologin-pam-service))) + (sddm-autologin-pam-service config))) (define %sddm-accounts (list (user-group (name "sddm") (system? #t)) From patchwork Tue May 21 13:21:10 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Reza Alizadeh Majd X-Patchwork-Id: 14045 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 68C4517036; Tue, 21 May 2019 14:22:14 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id 2CE9717033 for ; Tue, 21 May 2019 14:22:14 +0100 (BST) Received: from localhost ([127.0.0.1]:53779 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4ib-0004NC-Mt for patchwork@mira.cbaines.net; Tue, 21 May 2019 09:22:13 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56273) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4iR-0004DY-63 for guix-patches@gnu.org; Tue, 21 May 2019 09:22:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT4iQ-0001DD-88 for guix-patches@gnu.org; Tue, 21 May 2019 09:22:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53679) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hT4iQ-0001Ck-5S for guix-patches@gnu.org; Tue, 21 May 2019 09:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hT4iQ-0003BH-11 for guix-patches@gnu.org; Tue, 21 May 2019 09:22:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35844] [PATCH 2/2] doc: update minimum-uid document for sddm-configuration. Resent-From: Reza Alizadeh Majd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 May 2019 13:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 35844 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35844@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.155844488812157 (code B ref -1); Tue, 21 May 2019 13:22:01 +0000 Received: (at submit) by debbugs.gnu.org; 21 May 2019 13:21:28 +0000 Received: from localhost ([127.0.0.1]:38983 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT4hr-00039w-NJ for submit@debbugs.gnu.org; Tue, 21 May 2019 09:21:28 -0400 Received: from eggs.gnu.org ([209.51.188.92]:41790) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT4hq-00039e-Ct for submit@debbugs.gnu.org; Tue, 21 May 2019 09:21:26 -0400 Received: from lists.gnu.org ([209.51.188.17]:35246) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hT4hl-00006L-5n for submit@debbugs.gnu.org; Tue, 21 May 2019 09:21:21 -0400 Received: from eggs.gnu.org ([209.51.188.92]:56165) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4hk-0003iv-62 for guix-patches@gnu.org; Tue, 21 May 2019 09:21:21 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT4hi-0008UA-QW for guix-patches@gnu.org; Tue, 21 May 2019 09:21:20 -0400 Received: from [5.230.148.152] (port=60985 helo=Rezas-MacBook-Pro-2.local) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT4hh-0008NQ-Im for guix-patches@gnu.org; Tue, 21 May 2019 09:21:18 -0400 Received: by Rezas-MacBook-Pro-2.local (Postfix, from userid 501) id D1884101B313B7; Tue, 21 May 2019 17:51:12 +0430 (+0430) From: Reza Alizadeh Majd Date: Tue, 21 May 2019 17:51:10 +0430 Message-Id: <20190521132110.85299-2-r.majd@pantherx.org> X-Mailer: git-send-email 2.19.0 In-Reply-To: <20190521132110.85299-1-r.majd@pantherx.org> References: <20190521132110.85299-1-r.majd@pantherx.org> MIME-Version: 1.0 X-detected-operating-system: by eggs.gnu.org: Mac OS X [generic] [fuzzy] X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Reza Alizadeh Majd Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: "Guix-patches" X-getmail-retrieved-from-mailbox: Patches --- doc/guix.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 27e0f72ccb..6bce474859 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -13609,7 +13609,8 @@ Directory to look for faces. Default PATH to use. @item @code{minimum-uid} (default 1000) -Minimum UID to display in SDDM. +Minimum UID to display in SDDM. This option also used in @code{sddm-pam-service} and +@code{sddm-autologin-pam-service} in order to set minimum UID which allows to login. @item @code{maximum-uid} (default 2000) Maximum UID to display in SDDM