kiran-session-guard/0001-fix-kiran-auth-unset-screensaver-dialog-no-fail-dela.patch
liuxinhao 9b492fd253 fix(polkit-agent & locker): Remove the restriction on polkit-agent authentication errors,unset screensaver-dialog no fail delay
- 去除polkit-agent认证错误限制,加入重新认证按钮。取消掉screensaver-dialog no-fail-delay。
2023-05-31 16:38:02 +08:00

54 lines
1.9 KiB
Diff
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

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