1 Star 0 Fork 6

liubuguiii/src-kiran-session-guard

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
0001-fix-kiran-auth-unset-screensaver-dialog-no-fail-dela.patch 1.89 KB
一键复制 编辑 原始数据 按行查看 历史
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
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/liubuguiii/src-kiran-session-guard.git
git@gitee.com:liubuguiii/src-kiran-session-guard.git
liubuguiii
src-kiran-session-guard
src-kiran-session-guard
master

搜索帮助