diff --git a/BUILD/sddm-0.18.0/src/auth/AuthPrompt.h b/BUILD/sddm-0.18.0/src/auth/AuthPrompt.h index 2f1b0f0..08a8a87 100644 --- a/BUILD/sddm-0.18.0/src/auth/AuthPrompt.h +++ b/BUILD/sddm-0.18.0/src/auth/AuthPrompt.h @@ -56,7 +56,8 @@ namespace SDDM { CHANGE_NEW, ///< On changing the password: The new one CHANGE_REPEAT, ///< On changing the password: The new one, repeated LOGIN_USER = 0x0080, ///< On logging in: The username - LOGIN_PASSWORD ///< On logging in: The password + LOGIN_PASSWORD, ///< On logging in: The password + LOGIN_PIN ///< On logging in: The PIN code }; /** * @return the type of the prompt diff --git a/BUILD/sddm-0.18.0/src/daemon/Display.cpp b/BUILD/sddm-0.18.0/src/daemon/Display.cpp index e489cab..adc3695 100644 --- a/BUILD/sddm-0.18.0/src/daemon/Display.cpp +++ b/BUILD/sddm-0.18.0/src/daemon/Display.cpp @@ -481,8 +481,8 @@ namespace SDDM { // see what we got from pam conv() and will be send to greeter qDebug() << "Display: requestChanged with " << n_prompts << " prompts from Auth"; - // respond to login password request - if (n_prompts == 1 && type_prompt0 == AuthPrompt::LOGIN_PASSWORD) { + // respond to login password or login PIN request + if (n_prompts == 1 && type_prompt0 == AuthPrompt::LOGIN_PASSWORD || type_prompt0 == AuthPrompt::LOGIN_PIN) { m_auth->request()->prompts()[0]->setResponse(qPrintable(m_passPhrase)); m_auth->request()->done(); return; diff --git a/BUILD/sddm-0.18.0/src/helper/backend/PamBackend.cpp b/BUILD/sddm-0.18.0/src/helper/backend/PamBackend.cpp index 70bd65a..68582e5 100644 --- a/BUILD/sddm-0.18.0/src/helper/backend/PamBackend.cpp +++ b/BUILD/sddm-0.18.0/src/helper/backend/PamBackend.cpp @@ -80,6 +80,8 @@ namespace SDDM { else { return AuthPrompt::LOGIN_PASSWORD; } + } else if (message.indexOf(QRegExp(QStringLiteral("\\bPIN\\b"), Qt::CaseInsensitive)) >= 0) { + return AuthPrompt::LOGIN_PIN; } } else {