fix(ukey):Fix the issue of duplicate binding of the same UKey device
- 修复同一个UKey设备可以重复绑定的问题 Related #I78P3F
This commit is contained in:
parent
f8803042a9
commit
c0ac94b3e1
@ -0,0 +1,44 @@
|
|||||||
|
From aab75172b1f174daf68c401b6e350f994f14fad1 Mon Sep 17 00:00:00 2001
|
||||||
|
From: luoqing <luoqing@kylinsec.com.cn>
|
||||||
|
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
|
||||||
|
|
||||||
@ -1,7 +1,7 @@
|
|||||||
Name: kiran-authentication-devices
|
Name: kiran-authentication-devices
|
||||||
|
|
||||||
Version: 2.5.1
|
Version: 2.5.1
|
||||||
Release: 4
|
Release: 5
|
||||||
Summary: Kiran Authentication Devices
|
Summary: Kiran Authentication Devices
|
||||||
|
|
||||||
License: MulanPSL-2.0
|
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
|
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
|
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
|
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: cmake
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -67,6 +68,9 @@ systemctl enable kiran-authentication-devices.service
|
|||||||
rm -rf ${buildroot}
|
rm -rf ${buildroot}
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Fri Jun 16 2023 luoqing <luoqing@kylinsec.com.cn> - 2.5.1-5
|
||||||
|
- KYOS-F: Fix the issue of duplicate binding of the same UKey device (#I78P3F)
|
||||||
|
|
||||||
* Fri Jun 2 2023 luoqing <luoqing@kylinsec.com.cn> - 2.5.1-4
|
* Fri Jun 2 2023 luoqing <luoqing@kylinsec.com.cn> - 2.5.1-4
|
||||||
- KYOS-F: Fix the issue of not obtaining features from the database when deviceSerialNumber is empty
|
- KYOS-F: Fix the issue of not obtaining features from the database when deviceSerialNumber is empty
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user