diff --git a/0001-fix-ukey-Fix-the-issue-of-duplicate-binding-of-the-s.patch b/0001-fix-ukey-Fix-the-issue-of-duplicate-binding-of-the-s.patch new file mode 100644 index 0000000000000000000000000000000000000000..6a400d354978d177d61bb63e369c292bbb0f2399 --- /dev/null +++ b/0001-fix-ukey-Fix-the-issue-of-duplicate-binding-of-the-s.patch @@ -0,0 +1,44 @@ +From aab75172b1f174daf68c401b6e350f994f14fad1 Mon Sep 17 00:00:00 2001 +From: luoqing +Date: Mon, 12 Jun 2023 15:23:30 +0800 +Subject: [PATCH] fix(ukey):Fix the issue of duplicate binding of the same UKey + device +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +- 修复同一个UKey设备可以重复绑定的问题 + +Related #I78P3F +--- + src/device/ukey/ukey-ft-device.cpp | 1 + + src/feature-db.cpp | 1 + + 2 files changed, 2 insertions(+) + +diff --git a/src/device/ukey/ukey-ft-device.cpp b/src/device/ukey/ukey-ft-device.cpp +index e8f5070..14f09ef 100644 +--- a/src/device/ukey/ukey-ft-device.cpp ++++ b/src/device/ukey/ukey-ft-device.cpp +@@ -210,6 +210,7 @@ ULONG UKeyFTDevice::createContainer(const QString &pin, DEVHANDLE devHandle, HAP + bool UKeyFTDevice::isExistBinding() + { + QStringList featureIDs = FeatureDB::getInstance()->getFeatureIDs(deviceInfo().idVendor, deviceInfo().idProduct, deviceType(), deviceSerialNumber()); ++ KLOG_DEBUG() << "Existing Binding featureIDs:" << featureIDs; + for (auto id : featureIDs) + { + FeatureInfo info = FeatureDB::getInstance()->getFeatureInfo(id); +diff --git a/src/feature-db.cpp b/src/feature-db.cpp +index a8aa883..6cf8735 100644 +--- a/src/feature-db.cpp ++++ b/src/feature-db.cpp +@@ -166,6 +166,7 @@ QStringList FeatureDB::getFeatureIDs(const QString &idVendor, const QString &idP + sql.append(" AND deviceSerialNumber = :serialNumber"); + } + ++ query.prepare(sql); + query.bindValue(":Vid", idVendor); + query.bindValue(":Pid", idProduct); + query.bindValue(":devType", (int)deviceType); +-- +2.33.0 + diff --git a/kiran-authentication-devices.spec b/kiran-authentication-devices.spec index a7a19782581d299808b1debf71dd14296ee83fd7..f45f286bad04d109f67b49eadc93be05f0a52f00 100644 --- a/kiran-authentication-devices.spec +++ b/kiran-authentication-devices.spec @@ -1,7 +1,7 @@ Name: kiran-authentication-devices Version: 2.5.1 -Release: 4 +Release: 5 Summary: Kiran Authentication Devices License: MulanPSL-2.0 @@ -10,6 +10,7 @@ Source0: %{name}-%{version}.tar.gz Patch0001: 0001-fix-mf-iristar-driver-Fix-compilation-issues-with-st.patch Patch0002: 0001-fix-ukey-Fix-the-issue-where-only-one-ukey-can-be-bo.patch Patch0003: 0001-fix-feature-db-Fix-the-issue-of-not-obtaining-featur.patch +Patch0004: 0001-fix-ukey-Fix-the-issue-of-duplicate-binding-of-the-s.patch BuildRequires: cmake BuildRequires: gcc-c++ @@ -67,6 +68,9 @@ systemctl enable kiran-authentication-devices.service rm -rf ${buildroot} %changelog +* Fri Jun 16 2023 luoqing - 2.5.1-5 +- KYOS-F: Fix the issue of duplicate binding of the same UKey device (#I78P3F) + * Fri Jun 2 2023 luoqing - 2.5.1-4 - KYOS-F: Fix the issue of not obtaining features from the database when deviceSerialNumber is empty