Skip to content

Commit 0786621

Browse files
committed
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.
1 parent a823ae6 commit 0786621

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/greeter/UserModel.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,8 @@ namespace SDDM {
7676
user->homeDir = QString(current_pw->pw_dir);
7777
user->uid = int(current_pw->pw_uid);
7878
user->gid = int(current_pw->pw_gid);
79+
// if shadow is used pw_passwd will be 'x' nevertheless, so this
80+
// will always be true
7981
user->needsPassword = strcmp(current_pw->pw_passwd, "") != 0;
8082

8183
// search for face icon

0 commit comments

Comments
 (0)