Subject: bug#35845: closed (Re: [bug#35845] [PATCH 2/2] doc: update minimum-uid document for sddm-configuration.)

From: [email-masked] (GNU bug Tracking System)
Date: Sat, 25 May 2019 18:04:02 +0000

Your bug report

#35845: [PATCH 1/2] services: sddm: fix root login failure issue.

which was filed against the guix-patches package, has been closed.

The explanation is attached below, along with your original report.
If you require more details, please reply to [email-masked].

-- 
35845: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=35845
GNU Bug Tracking System
Contact [email-masked] with problems

Subject: Re: [bug#35845] [PATCH 2/2] doc: update minimum-uid document for sddm-configuration.
From: Ludovic Courtès <[email-masked]>
To: "Reza Alizadeh Majd" <[email-masked]>
Cc: [email-masked]
Date: Sat, 25 May 2019 20:03:00 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hi,

"Reza Alizadeh Majd" <[email-masked]> skribis:

> as we discussed in https://issues.guix.gnu.org/issue/35749#6 , I had submitted 
> both changes in a new PATCH as https://issues.guix.gnu.org/issue/35845 . 

OK, applied now; I tweaked the wording in guix.texi for clarity, I hope
that’s OK.

Thanks,
Ludo’.

Subject: [PATCH 1/2] services: sddm: fix root login failure issue.
From: Reza Alizadeh Majd <[email-masked]>
To: [email-masked]
Cc: Reza Alizadeh Majd <[email-masked]>
Date: Tue, 21 May 2019 17:51:09 +0430
List-Id: <debbugs-submit.debbugs.gnu.org>

* 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))
-- 
2.19.0