From patchwork Tue May 21 11:42:45 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: 14042 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 BC5AA17034; Tue, 21 May 2019 12:44: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 2B2CD17032 for ; Tue, 21 May 2019 12:44:08 +0100 (BST) Received: from localhost ([127.0.0.1]:51831 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT3Be-0007Py-2F for patchwork@mira.cbaines.net; Tue, 21 May 2019 07:44:06 -0400 Received: from eggs.gnu.org ([209.51.188.92]:37516) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1hT3Bb-0007Pj-Ml for guix-patches@gnu.org; Tue, 21 May 2019 07:44:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hT3Ba-0005gL-JD for guix-patches@gnu.org; Tue, 21 May 2019 07:44:03 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:53486) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hT3Ba-0005gD-Fu for guix-patches@gnu.org; Tue, 21 May 2019 07:44:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hT3Ba-0004gL-Aq for guix-patches@gnu.org; Tue, 21 May 2019 07:44:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#35749] [PATCH 1/2] services: sddm: fix root login failure issue. References: <20190515141154.31832-1-r.majd@pantherx.org> In-Reply-To: <20190515141154.31832-1-r.majd@pantherx.org> Resent-From: Reza Alizadeh Majd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 21 May 2019 11:44:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 35749 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 35749@debbugs.gnu.org Received: via spool by 35749-submit@debbugs.gnu.org id=B35749.155843899017897 (code B ref 35749); Tue, 21 May 2019 11:44:02 +0000 Received: (at 35749) by debbugs.gnu.org; 21 May 2019 11:43:10 +0000 Received: from localhost ([127.0.0.1]:38794 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT3Ak-0004eb-99 for submit@debbugs.gnu.org; Tue, 21 May 2019 07:43:10 -0400 Received: from [5.230.148.152] (port=60387 helo=Rezas-MacBook-Pro-2.local) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hT3Ai-0004eR-Js for 35749@debbugs.gnu.org; Tue, 21 May 2019 07:43:09 -0400 Received: by Rezas-MacBook-Pro-2.local (Postfix, from userid 501) id F3809101B300DB; Tue, 21 May 2019 16:13:04 +0430 (+0430) From: Reza Alizadeh Majd Date: Tue, 21 May 2019 16:12:45 +0430 Message-Id: <20190521114246.82283-1-r.majd@pantherx.org> X-Mailer: git-send-email 2.19.0 MIME-Version: 1.0 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))