54 lines
1.9 KiB
Diff
54 lines
1.9 KiB
Diff
From 5d0ba7b98f745b6090fd9c069bd9cc3d845c5421 Mon Sep 17 00:00:00 2001
|
||
From: liuxinhao <liuxinhao@kylinsec.com.cn>
|
||
Date: Mon, 29 May 2023 20:24:57 +0800
|
||
Subject: [PATCH 1/2] fix(kiran auth): unset screensaver-dialog no fail delay
|
||
MIME-Version: 1.0
|
||
Content-Type: text/plain; charset=UTF-8
|
||
Content-Transfer-Encoding: 8bit
|
||
|
||
- 取消掉screensaver-dialog no-fail-delay,开启screensaver-dialog认证时的错误延时,显示出锁定后的提示消息
|
||
|
||
Closes #I7937W
|
||
---
|
||
lib/login-frame/login-frame.cpp | 8 +++-----
|
||
src/screensaver-dialog/session-guard-checkpass/main.cpp | 4 +---
|
||
2 files changed, 4 insertions(+), 8 deletions(-)
|
||
|
||
diff --git a/lib/login-frame/login-frame.cpp b/lib/login-frame/login-frame.cpp
|
||
index e80b057..8e49d84 100644
|
||
--- a/lib/login-frame/login-frame.cpp
|
||
+++ b/lib/login-frame/login-frame.cpp
|
||
@@ -278,11 +278,9 @@ void LoginFrame::onShowPrmpt(const QString& text, PromptType type)
|
||
void LoginFrame::onAuthComplete(bool authRes)
|
||
{
|
||
KLOG_DEBUG() << "auth complete" << authRes;
|
||
- if (authRes)
|
||
- {
|
||
- authenticateComplete(authRes, m_authController->authenticationUser());
|
||
- }
|
||
- else
|
||
+ authenticateComplete(authRes, m_authController->authenticationUser());
|
||
+
|
||
+ if( !authRes )
|
||
{
|
||
#if 0
|
||
if (m_prompted)
|
||
diff --git a/src/screensaver-dialog/session-guard-checkpass/main.cpp b/src/screensaver-dialog/session-guard-checkpass/main.cpp
|
||
index 92ec34d..9bad98d 100644
|
||
--- a/src/screensaver-dialog/session-guard-checkpass/main.cpp
|
||
+++ b/src/screensaver-dialog/session-guard-checkpass/main.cpp
|
||
@@ -201,9 +201,7 @@ int main(int argc, char *argv[])
|
||
KLOG_WARNING() << "failed to start pam:" << pam_strerror(pamh, ret);
|
||
return EXIT_FAILURE;
|
||
}
|
||
-
|
||
- pam_set_item(pamh, PAM_FAIL_DELAY, (void *)no_fail_delay);
|
||
-
|
||
+
|
||
int authRes = PAM_SUCCESS;
|
||
authRes = pam_authenticate(pamh, 0);
|
||
const char *newUserName;
|
||
--
|
||
2.33.0
|
||
|