Skip to content
Permalink
Browse files Browse the repository at this point in the history
Fix authentication when reusing an existing session
- Check the success value before unlocking the session
- Don't attempt to use the nonexistant "sddm-check" PAM service
  • Loading branch information
Vogtinator committed Jul 17, 2018
1 parent 0c531e4 commit 147cec3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion src/daemon/Display.cpp
Expand Up @@ -339,7 +339,9 @@ namespace SDDM {
} else {
//we only want to unlock the session if we can lock in, so we want to go via PAM auth, but not start a new session
//by not setting the session and the helper will emit authentication and then quit
connect(m_auth, &Auth::authentication, this, [=](){
connect(m_auth, &Auth::authentication, this, [=](const QString &, bool success){
if(!success)
return;
qDebug() << "activating existing seat";
OrgFreedesktopLogin1ManagerInterface manager(Logind::serviceName(), Logind::managerPath(), QDBusConnection::systemBus());
manager.UnlockSession(existingSessionId);
Expand Down
2 changes: 0 additions & 2 deletions src/helper/backend/PamBackend.cpp
Expand Up @@ -219,8 +219,6 @@ namespace SDDM {

if (user == QStringLiteral("sddm") && m_greeter)
service = QStringLiteral("sddm-greeter");
else if (m_app->session()->path().isEmpty())
service = QStringLiteral("sddm-check");
else if (m_autologin)
service = QStringLiteral("sddm-autologin");
result = m_pam->start(service, user);
Expand Down

0 comments on commit 147cec3

Please sign in to comment.