[bug#35749] services: sddm: fix root login failure issue.
diff mbox series

Message ID 20190515141154.31832-1-r.majd@pantherx.org
State New
Headers show
Series
  • [bug#35749] services: sddm: fix root login failure issue.
Related show

Checks

Context Check Description
cbaines/applying patch success Successfully applied

Commit Message

Reza Alizadeh Majd May 15, 2019, 2:11 p.m. UTC
* 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(-)

Comments

Reza Alizadeh Majd May 15, 2019, 2:34 p.m. UTC | #1
There was an issue for root login using SDDM, that was related to hard-coded uid  in sddm-pam-service. 
this patch set's the uid based on `minimum-uid` option in `sddm-configuration`.

Best, 
Reza
Ludovic Courtès May 20, 2019, 9:16 p.m. UTC | #2
Hi,

Reza Alizadeh Majd <r.majd@pantherx.org> skribis:

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

Could you send an updated patch that documents the ‘minimum-uid’ field
in doc/guix.texi, under ‘sddm-configuration’?

Apart from that it LGTM.

Thanks for fixing this!

Ludo’.
Reza Alizadeh Majd May 21, 2019, 11:26 a.m. UTC | #3
Hi, 

> Could you send an updated patch that documents the ‘minimum-uid’ field
> in doc/guix.texi, under ‘sddm-configuration’?

Is it possible to submit further changes to this patch, or I need to submit a new one with whole changes? 

Thanks, 
Reza

Patch
diff mbox series

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