can't exit with ctrl-c using biometric autentication
This commit is contained in:
parent
0450e5e1c4
commit
81335772f3
@ -0,0 +1,46 @@
|
||||
From 641e55da3ba9f73d74dd7b67876a9f5024ba4898 Mon Sep 17 00:00:00 2001
|
||||
From: tanyulong2021 <tanyulong@kylinos.cn>
|
||||
Date: Wed, 3 Aug 2022 14:49:44 +0800
|
||||
Subject: [PATCH] can't exit with ctrl c using biometric autentication
|
||||
|
||||
---
|
||||
pam-biometric/pam_biometric.c | 15 ++++++++++++++-
|
||||
1 file changed, 14 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/pam-biometric/pam_biometric.c b/pam-biometric/pam_biometric.c
|
||||
index 61f3dd6..c235d00 100755
|
||||
--- a/pam-biometric/pam_biometric.c
|
||||
+++ b/pam-biometric/pam_biometric.c
|
||||
@@ -139,6 +139,12 @@ void child(char *service, char *username, char *xdisp)
|
||||
_exit(BIO_IGNORE);
|
||||
}
|
||||
|
||||
+void handler()
|
||||
+{
|
||||
+ return;
|
||||
+}
|
||||
+
|
||||
+
|
||||
/* PAM parent process */
|
||||
int parent(int pid, pam_handle_t *pamh, int need_call_conv)
|
||||
{
|
||||
@@ -181,8 +187,15 @@ int parent(int pid, pam_handle_t *pamh, int need_call_conv)
|
||||
waitpid(pid, &child_status, 0);
|
||||
} else {
|
||||
logger("Waiting for the GUI child process to exit...\n");
|
||||
- waitpid(pid, &child_status, 0);
|
||||
+ sigset_t mask;
|
||||
+ sigprocmask(SIG_BLOCK,NULL,&mask);
|
||||
+ sigprocmask(SIG_UNBLOCK,&mask,NULL);
|
||||
+
|
||||
+ sinal(SIGINT,handler);
|
||||
+
|
||||
+ waitpid(pid, &child_status, 0);
|
||||
logger("GUI child process has exited.\n");
|
||||
+ sigprocmask(SIG_SETMASK,&mask,NULL);
|
||||
}
|
||||
|
||||
/*
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -4,7 +4,7 @@
|
||||
Name: ukui-biometric-auth
|
||||
Summary: ukui-biometric-auth
|
||||
Version: 1.2.1
|
||||
Release: 9
|
||||
Release: 10
|
||||
|
||||
License: GPL-3+
|
||||
URL: https://github.com/ukui/ukui-biometric-auth
|
||||
@ -18,6 +18,7 @@ Patch1: 0002-add-and-use-attribute-of-UseHighDpiPixmaps.patch
|
||||
Patch2: 0003-modify-pam-module.patch
|
||||
Patch3: 0004-solve-the-problem-that-ukui-greeter-wayland-can-t-use-biometric-authentication.patch
|
||||
Patch4: 0005-fix-the-problem-that-the-probability-window-is-not-displayed-in-the-center-of-screen.patch
|
||||
Patch5: 0006-can-t-exit-with-ctrl-c-using-biometric-autentication.patch
|
||||
|
||||
%description
|
||||
ukui-biometric-auth
|
||||
@ -53,6 +54,7 @@ biometric-auth package.
|
||||
%patch2 -p1
|
||||
%patch3 -p1
|
||||
%patch4 -p1
|
||||
%patch5 -p1
|
||||
|
||||
%build
|
||||
mkdir build
|
||||
@ -87,6 +89,9 @@ make DESTDIR=$RPM_BUILD_ROOT install
|
||||
|
||||
|
||||
%changelog
|
||||
* Wed Aug 03 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.1-10
|
||||
- can't exit with ctrl-c using biometric autentication
|
||||
|
||||
* Tue Aug 02 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.1-9
|
||||
- fix the problem that the probability window is not displayed in the center of screen
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user