[PATCH] services: sddm: fix root login failure issue.

  • Done
  • quality assurance status badge
Details
3 participants
  • Efraim Flashner
  • Ludovic Courtès
  • Reza Alizadeh Majd
Owner
unassigned
Submitted by
Reza Alizadeh Majd
Severity
normal
R
R
Reza Alizadeh Majd wrote on 15 May 2019 16:11
(address . guix-patches@gnu.org)(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)
20190515141154.31832-1-r.majd@pantherx.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(-)

Toggle diff (58 lines)
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
R
R
Reza Alizadeh Majd wrote on 15 May 2019 16:34
SDDM root login issue
(address . 35749@debbugs.gnu.org)
aa45b334-f4fd-4b30-9c8c-4b1639781f46@www.fastmail.com
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
L
L
Ludovic Courtès wrote on 20 May 2019 23:16
Re: [bug#35749] [PATCH] services: sddm: fix root login failure issue.
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 35749@debbugs.gnu.org)
87y330omhs.fsf@gnu.org
Hi,

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

Toggle quote (9 lines)
> * 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’.
R
R
Reza Alizadeh Majd wrote on 21 May 2019 13:26
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 35749@debbugs.gnu.org)
41a6a5e2-86cc-42d6-995e-a20c0217924e@www.fastmail.com
Hi,

Toggle quote (3 lines)
> 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
R
R
Reza Alizadeh Majd wrote on 21 May 2019 13:42
[PATCH 1/2] services: sddm: fix root login failure issue.
(address . 35749@debbugs.gnu.org)(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)
20190521114246.82283-1-r.majd@pantherx.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(-)

Toggle diff (58 lines)
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
R
R
Reza Alizadeh Majd wrote on 21 May 2019 13:42
[PATCH 2/2] doc: update minimum-uid document for sddm-configuration.
(address . 35749@debbugs.gnu.org)(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)
20190521114246.82283-2-r.majd@pantherx.org
---
doc/guix.texi | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)

Toggle diff (16 lines)
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
--
2.19.0
L
L
Ludovic Courtès wrote on 21 May 2019 15:17
Re: [bug#35749] [PATCH] services: sddm: fix root login failure issue.
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)(address . 35749@debbugs.gnu.org)
87lfz02bh1.fsf@gnu.org
Hi,

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

Toggle quote (5 lines)
>> 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?

Please send us a new patch that includes all the changes.

Thanks in advance!

Ludo’.
R
R
Reza Alizadeh Majd wrote on 21 May 2019 15:21
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 35749@debbugs.gnu.org)
d16a5f00-95c2-42be-bf5a-8c9dd0c49e70@www.fastmail.com
OK, sure

On Tue, May 21, 2019, at 5:47 PM, Ludovic Courtès wrote:
Toggle quote (15 lines)
> Hi,
>
> "Reza Alizadeh Majd" <r.majd@pantherx.org> skribis:
>
> >> 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?
>
> Please send us a new patch that includes all the changes.
>
> Thanks in advance!
>
> Ludo’.
>
E
E
Efraim Flashner wrote on 15 Oct 2019 21:38
(name . Reza Alizadeh Majd)(address . r.majd@pantherx.org)
20191015193810.GD939@E5400
This patch-set was pushed back in May. Closing the bug now :)


--
Efraim Flashner <efraim@flashner.co.il> ????? ?????
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
-----BEGIN PGP SIGNATURE-----

iQIzBAABCgAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAl2mICIACgkQQarn3Mo9
g1GbTxAAlvdwZH/67TFSxWSZWjoCGR3/3O5Uh5d43eHa8koofoxvINdjlF2MPDry
347vQ2TAjlSibJaWDZl01jfdy3XUdTrkgk9VGf4A0HhJ7sZODlTwS+fRdtXUIDEM
ZI1ErxQp1QnyridMRZd2HbhGu13uDtyD03SJKkyWd/Gb66OamgOr9mys4uYIZO6l
nJkah/KELoJirXx7SXx3BpMR4yor8v6Y958fyIHrpynxajx1GxKTwMHmmTc5X+fa
N3dbJU5PjIhu2NPNmUWb84KdD+WvBGSYIPjsxWeII2UihUg7BKiTQch6Na+kpjSe
iFP8DD3lhO1FTT2c64l8zbsjw7xs21wRBXN3juQAJc19IZZpfaQ5KCQKrQRCRseF
pb3ihiKsABMRdjnzPDhPZE0YcJMrKrVu/74LTy+QkVjo7lNns0frrHTCmOIk3jSQ
nLRsRPri/r2okYqf2w2FIgpma7jXpLJx+bbEDLvF4YN+LyIAM1wZYTYK0vFs/0PP
Xd+JlNQpfmBSCcJceXg5nTC3HlshepOaZDuiP2OLN2cF2hYy+pNXlGnfR3/fkIiB
W2zNTGQ9M5pUDmOy2U0M8i4+5Vu1VAaJsbgo95ZeI1ye8teKxRV1gIiCYpKkUIEq
ag5368DCYEdeHZYZXvE4ntFdCjFnDFh/0Y7Kt7DTtM9UuIXoVXI=
=ksd2
-----END PGP SIGNATURE-----


Closed
?