summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorReza Alizadeh Majd <r.majd@pantherx.org>2019-05-21 17:51:09 +0430
committerLudovic Courtès <ludo@gnu.org>2019-05-26 01:34:16 +0200
commited90104cc82fdd6b762a159b06c0ea37b417a9a5 (patch)
treed53ee62bffa757406950fe4b1b6d7b4e7292d48c
parent336674549dfd2102479da0d2b92aaaf583f52c92 (diff)
downloadpatches-ed90104cc82fdd6b762a159b06c0ea37b417a9a5.tar
patches-ed90104cc82fdd6b762a159b06c0ea37b417a9a5.tar.gz
services: sddm: Fix root login failure issue.
* gnu/services/sddm.scm (sdm-pam-service): Set uid from CONFIG. (sdm-autologin-pam-service): Set uid from CONFIG. (sdm-pam-services): Pass CONFIG to 'sddm-pam-service' and 'sddm-autologin-pam-service'. * doc/guix.texi (X Window): Adjust 'minimum-uid' documentation. Co-authored-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--doc/guix.texi8
-rw-r--r--gnu/services/sddm.scm16
2 files changed, 14 insertions, 10 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ee10e65be0..d60f453b24 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -13623,11 +13623,11 @@ Directory to look for faces.
@item @code{default-path} (default "/run/current-system/profile/bin")
Default PATH to use.
-@item @code{minimum-uid} (default 1000)
-Minimum UID to display in SDDM.
+@item @code{minimum-uid} (default: 1000)
+Minimum UID displayed in SDDM and allowed for log-in.
-@item @code{maximum-uid} (default 2000)
-Maximum UID to display in SDDM
+@item @code{maximum-uid} (default: 2000)
+Maximum UID to display in SDDM.
@item @code{remember-last-user?} (default #t)
Remember last user.
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))