You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
sddm/0050-Add-a-note-about-needs...

31 lines
1.1 KiB

From 07866210800743a5930f6e77a4ad6cb85b8e51b7 Mon Sep 17 00:00:00 2001
From: Pier Luigi Fiorini <pierluigi.fiorini@gmail.com>
Date: Sun, 21 Jun 2015 12:18:17 +0200
Subject: [PATCH 50/70] Add a note about needsPassword role and shadow
The flag will always be true when shadow is used because pw_passwd
will contain 'x' even if the password was erased.
When shadow is used we'll still see the password prompt but we'll
be able to login just pressing enter.
---
src/greeter/UserModel.cpp | 2 ++
1 file changed, 2 insertions(+)
diff --git a/src/greeter/UserModel.cpp b/src/greeter/UserModel.cpp
index 82d123c..2365828 100644
--- a/src/greeter/UserModel.cpp
+++ b/src/greeter/UserModel.cpp
@@ -76,6 +76,8 @@ namespace SDDM {
user->homeDir = QString(current_pw->pw_dir);
user->uid = int(current_pw->pw_uid);
user->gid = int(current_pw->pw_gid);
+ // if shadow is used pw_passwd will be 'x' nevertheless, so this
+ // will always be true
user->needsPassword = strcmp(current_pw->pw_passwd, "") != 0;
// search for face icon
--
2.4.3