Compare commits

...

14 Commits

Author SHA1 Message Date
openeuler-ci-bot
ca54f78a74
!35 update glib2 error
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2023-05-25 05:57:21 +00:00
peijiankang
40cc20b8e3 update glib2 error 2023-05-25 11:15:03 +08:00
openeuler-ci-bot
7507fcb6c0
!31 update to upstream version 1.2.4-1
From: @hua_yadong 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2023-05-24 02:25:56 +00:00
huayadong
281ea0932a update to upstream version 1.2.4-1 2023-05-24 10:04:18 +08:00
openeuler-ci-bot
ea53c4fc19
!28 add debug to fix not strip
From: @peijiankang 
Reviewed-by: @dou33 
Signed-off-by: @dou33
2023-03-01 08:11:29 +00:00
peijiankang
c73d247bc6 add debug to fix not strip 2023-03-01 15:05:51 +08:00
openeuler-ci-bot
04938a211a
!27 fix Username to long and ends the display
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-12-23 01:32:10 +00:00
tanyulong2021
0574a73fb8 fix Username to long and ends the display 2022-12-19 13:37:13 +08:00
openeuler-ci-bot
55e74050ca
!25 control file add opencv complication dependencies
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-08-05 03:34:48 +00:00
tanyulong2021
ce55a2cd38 control file add opencv complication dependencies 2022-08-04 11:25:20 +08:00
openeuler-ci-bot
d3618b7f36
!24 can't exit with ctrl-c using biometric autentication
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-08-03 08:35:07 +00:00
openeuler-ci-bot
8ee02e16a7
!23 fix the problem that the probability window is not displayed in the center of screen
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-08-03 06:43:37 +00:00
openeuler-ci-bot
e34c787e0d
!22 solve the problem that ukui-greeter-wayland can't use biometric authentication
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-08-02 02:33:48 +00:00
openeuler-ci-bot
f23bd79235
!19 modify pam module
From: @tanyulong2021 
Reviewed-by: @peijiankang 
Signed-off-by: @peijiankang
2022-08-01 06:27:27 +00:00
10 changed files with 49 additions and 246 deletions

View File

@ -1,24 +0,0 @@
From e2065a497b13f86ef814ee4181428e779ec0d1bc Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 1 Aug 2022 10:44:35 +0800
Subject: [PATCH] add window icon
---
polkit-agent/src/mainwindow.cpp | 1 +
1 file changed, 1 insertion(+)
diff --git a/polkit-agent/src/mainwindow.cpp b/polkit-agent/src/mainwindow.cpp
index 2913873..7a74bb1 100755
--- a/polkit-agent/src/mainwindow.cpp
+++ b/polkit-agent/src/mainwindow.cpp
@@ -192,6 +192,7 @@ void MainWindow::setIcon(const QString &iconName)
painter.drawPixmap(rect, actionIcon);
painter.end();
+ setWindowIcon(icon);
ui->lblIcon->setPixmap(icon);
}
--
2.33.0

View File

@ -0,0 +1,24 @@
From 20f3e8fa4cf4ad8f7ed9ac3ababa16e4e588dd27 Mon Sep 17 00:00:00 2001
From: huayadong <huayadong@kylinos.cn>
Date: Wed, 24 May 2023 09:24:49 +0800
Subject: [PATCH] fix build compile error
---
bioauth/src/giodbus.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/bioauth/src/giodbus.cpp b/bioauth/src/giodbus.cpp
index c7983ae..cf8ee02 100644
--- a/bioauth/src/giodbus.cpp
+++ b/bioauth/src/giodbus.cpp
@@ -1,6 +1,6 @@
#include "giodbus.h"
#include <gio/gio.h>
-#include <gio-unix-2.0/gio/gunixfdlist.h>
+#include <glib-2.0/gio/gunixfdlist.h>
#include <glib.h>
int get_server_gvariant_stdout (int drvid)
--
2.36.1

View File

@ -1,33 +0,0 @@
From a408cee19e004f1c3e0fea33696fd9a862deb05c Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 1 Aug 2022 11:46:01 +0800
Subject: [PATCH] add and use attribute of UseHighDpiPixmaps
---
polkit-agent/src/PolkitAgent.cpp | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)
diff --git a/polkit-agent/src/PolkitAgent.cpp b/polkit-agent/src/PolkitAgent.cpp
index 6966c05..31a234d 100755
--- a/polkit-agent/src/PolkitAgent.cpp
+++ b/polkit-agent/src/PolkitAgent.cpp
@@ -36,9 +36,14 @@ int main(int argc, char *argv[])
logPrefix = "[ukui-polkit]:";
qInstallMessageHandler(outputMessage);
- qDebug() << "Polkit Agent Started";
+ qDebug() << "Polkit Agent Started";
+ #if(QT_VERSION >= QT_VERSION_CHECK(5,6,0))
+ QApplication::setAttribute(Qt::AA_EnableHighDpiScaling);
+ QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps);
+ #endif
+
- QApplication agent(argc, argv);
+ QApplication agent(argc, argv);
QString locale = QLocale::system().name();
qDebug() << "Language: " <<locale;
--
2.33.0

View File

@ -1,25 +0,0 @@
From d42362b527f2bf34502875316da13e9e65fe58e6 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Mon, 1 Aug 2022 14:09:01 +0800
Subject: [PATCH] modify pam module
---
pam-biometric/pam_biometric.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/pam-biometric/pam_biometric.c b/pam-biometric/pam_biometric.c
index ecf55c9..1d7dbbb 100755
--- a/pam-biometric/pam_biometric.c
+++ b/pam-biometric/pam_biometric.c
@@ -454,3 +454,8 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
logger("Service <%s> slip through the service filter\n", service);
return PAM_IGNORE;
}
+
+int pam_sm_setcred(pam_handle_t *pamh , int flags , int argc , const char **argv)
+{
+ return PAM_SUCCESS;
+}
--
2.33.0

View File

@ -1,26 +0,0 @@
From 6c45acf841e87520a5dbe6d768ee90c39ec67f02 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Tue, 2 Aug 2022 10:15:43 +0800
Subject: [PATCH] solve the problem that ukui-greeter-wayland can't use
biometric authentication
---
pam-biometric/pam_biometric.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/pam-biometric/pam_biometric.c b/pam-biometric/pam_biometric.c
index 1d7dbbb..61f3dd6 100755
--- a/pam-biometric/pam_biometric.c
+++ b/pam-biometric/pam_biometric.c
@@ -425,7 +425,7 @@ int pam_sm_authenticate(pam_handle_t *pamh, int flags, int argc,
get_greeter_session(buf, sizeof(buf));
logger("current greeter: %s\n", buf);
- if(strcmp(buf, "ukui-greeter") == 0)
+ if(strcmp(buf, "ukui-greeter") == 0 || strcmp(buf, "ukui-greeter-wayland") == 0)
return biometric_auth_embeded(pamh);
// else
// return biometric_auth_independent(pamh, "lightdm", 1);
--
2.33.0

View File

@ -1,71 +0,0 @@
From 66f70196d984ce19a9f18a7ebe4ed567534aa3f6 Mon Sep 17 00:00:00 2001
From: tanyulong2021 <tanyulong@kylinos.cn>
Date: Tue, 2 Aug 2022 10:29:15 +0800
Subject: [PATCH] fix the problem that the probability window is not displayed
in the center of screen
---
.../polkit-ukui-authentication-agent-1.desktop.in | 2 +-
polkit-agent/src/PolkitListener.cpp | 12 ++++++++----
2 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in b/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in
index d9b9c45..f2f08fd 100755
--- a/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in
+++ b/polkit-agent/data/polkit-ukui-authentication-agent-1.desktop.in
@@ -81,7 +81,7 @@ Categories=
OnlyShowIn=UKUI;MATE
X-UKUI-StartupNotify=false
X-UKUI-AutoRestart=true
-X-UKUI-Autostart-Phase=Initialization
+X-UKUI-Autostart-Phase=Application
NoDisplay=true
X-DBUS-StartupType=Unique
X-MATE-Autostart-Phase=Initialization
diff --git a/polkit-agent/src/PolkitListener.cpp b/polkit-agent/src/PolkitListener.cpp
index 634b1db..ed0f805 100755
--- a/polkit-agent/src/PolkitListener.cpp
+++ b/polkit-agent/src/PolkitListener.cpp
@@ -27,7 +27,7 @@
#include <QDebug>
#include <QDesktopWidget>
#include <QApplication>
-
+#include <QScreen>
#include <fcntl.h>
#include "PolkitListener.h"
@@ -121,8 +121,9 @@ void PolkitListener::initiateAuthentication(
actionDesc.vendorUrl());
/* set the position of the mainwindow */
- QDesktopWidget *desktop = QApplication::desktop();
- QRect desktopRect = desktop->screen(desktop->primaryScreen())->geometry();
+ //QDesktopWidget *desktop = QApplication::desktop();
+ //QRect desktopRect = desktop->screen(desktop->primaryScreen())->geometry();
+ QRect desktopRect = QApplication::primaryScreen()->geometry();
mainWindow->move(desktopRect.left() + (desktopRect.width() - mainWindow->width()) / 2,
desktopRect.top() + (desktopRect.height() - mainWindow->height()) / 2);
@@ -288,6 +289,10 @@ void PolkitListener::onShowPrompt(const QString &prompt, bool echo)
}
mainWindow->show();
+ QRect desktopRect = QApplication::primaryScreen()->geometry();
+ mainWindow->move(desktopRect.left() + (desktopRect.width() - mainWindow->width()) / 2,
+ desktopRect.top() + (desktopRect.height() - mainWindow->height()) / 2);
+
mainWindow->activateWindow();
}
@@ -296,7 +301,6 @@ void PolkitListener::onShowError(const QString &text)
qDebug() << "[Polkit]:" << "Error:" << text;
if(mainWindow){
- qDebug() << "aaaaaaaaaaaaaaaaaaaaaaaaaaa";
mainWindow->setMessage(text);
}
}
--
2.33.0

View File

@ -1,46 +0,0 @@
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

Binary file not shown.

Binary file not shown.

View File

@ -1,24 +1,16 @@
%define debug_package %{nil}
Name: ukui-biometric-auth
Summary: ukui-biometric-auth
Version: 1.2.1
Release: 10
Version: 1.2.4
Release: 2
License: GPL-3+
URL: https://github.com/ukui/ukui-biometric-auth
Source0: %{name}-%{version}.tar.gz
BuildRequires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-devel pkg-config
BuildRequires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-devel pkg-config opencv qt5-qtsvg-devel glib2-devel gsettings-qt-devel
Requires: cmake qt5-qtbase-devel pam-devel polkit-qt5-1-devel qt5-qttools-devel pkg-config
Patch0: 0001-add-window-icon.patch
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
Patch1: 0001-fix-build-compile-error.patch
%description
ukui-biometric-auth
@ -49,22 +41,19 @@ biometric-auth package.
%prep
%setup -q
%patch0 -p1
if [ -e "/usr/include/glib-2.0/gio/gunixfdlist.h" ]; then
%patch1 -p1
%patch2 -p1
%patch3 -p1
%patch4 -p1
%patch5 -p1
fi
%build
mkdir build
cd build
cmake ..
make
%cmake ..
%{make_build}
%install
cd build
make DESTDIR=$RPM_BUILD_ROOT install
%{make_install} DESTDIR=$RPM_BUILD_ROOT
%preun -n libpam-biometric
#pam-auth-update --package --remove pam-biometric
@ -84,11 +73,26 @@ make DESTDIR=$RPM_BUILD_ROOT install
%files -n ukui-polkit
%{_sysconfdir}/xdg/*
%{_prefix}/lib/*
%{_prefix}/lib/ukui-polkit
%{_prefix}/share/ukui-biometric/i18n_qm/polkit/*.qm
%changelog
* Thu May 25 2023 peijiankang <peijiankang@kylinos.cn> - 1.2.4-2
- update glib2 error
* Mon May 22 2023 huayadong <huayadong@kylinos.cn> - 1.2.4-1
- update to upstream version 1.2.4-1
* Wed Mar 01 2023 peijiankang <peijiankang@kylinos.cn> - 1.2.1-13
- add debug to fix not strip
* Mon Dec 19 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.1-12
- Username to long and ends the display
* Thu Aug 04 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.1-11
- control file add opencv complication dependencies
* Wed Aug 03 2022 tanyulong <tanyulong@kylinos.cn> - 1.2.1-10
- can't exit with ctrl-c using biometric autentication