Check if sddm user exists
Needs ReviewPublic

Authored by filipf on Fri, Aug 23, 2:59 PM.

Details

Reviewers
davidedmundson
ngraham
fvogt
Group Reviewers
Plasma
VDG
Summary

Sddm-kcm should depend on sddm.
Sddm sets up an sddm user which is used to run the greeter.
Therefore it should not be possible to run sddm-kcm without an sddm user existing.

But if it should happen that's the case, this patch adds a check for the sddm user.
If the user is not present, everything will be aborted and an error message will pop-up.

openSUSE BUG:

Test Plan

changed line QString sddmHomeDirPath = KUser("sddm").homeDir(); to look up some bogus user
syncing and resetting is aborted, error message pops up

Diff Detail

Repository
R123 SDDM Configuration Panel (KCM)
Branch
sddm-user-check (branched from master)
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 15857
Build 15875: arc lint + arc unit
filipf created this revision.Fri, Aug 23, 2:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptFri, Aug 23, 2:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
filipf requested review of this revision.Fri, Aug 23, 2:59 PM

Whilst client checks are nice, for the reason you're changing it this should (also?) be in the authhelper.

filipf edited the summary of this revision. (Show Details)Fri, Aug 23, 3:01 PM
filipf edited the test plan for this revision. (Show Details)
filipf added reviewers: Plasma, davidedmundson, ngraham, VDG.
filipf updated this revision to Diff 64428.Fri, Aug 23, 3:17 PM
filipf edited the summary of this revision. (Show Details)

also apply the check for the auth helper

filipf updated this revision to Diff 64429.Fri, Aug 23, 3:26 PM

add qDebug info in auth helper

How about refactoring this "does SDDM user exist?" check into a function so we don't have to write virtually the same code three times?

davidedmundson added inline comments.Fri, Aug 23, 3:52 PM
sddmauthhelper.cpp
80

can we use sddmHomeDirPath + "whatever"

instead now

and get rid of this sddmUserConfig map entry

172

and here

filipf updated this revision to Diff 65000.Fri, Aug 30, 2:25 PM

Rebase on master