From b8223f67a3b115b5dc5795f8e069e0d862055760 Mon Sep 17 00:00:00 2001 From: gaoqiang_strong Date: Thu, 17 Apr 2025 22:34:36 +0800 Subject: [PATCH] =?UTF-8?q?=E8=80=81=E5=8C=96=E5=B0=81=E8=A3=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: gaoqiang_strong --- .../include/deviceprofile_connector.h | 6 +- .../src/deviceprofile_connector.cpp | 93 +++++++------ json/include/json_object.h | 8 ++ json/src/json_object_nlohmannjson.cpp | 44 ++++++ .../dependency/softbus/softbus_connector.h | 10 +- .../dm_auth_message_processor.cpp | 2 +- .../dependency/softbus/softbus_connector.cpp | 126 ++++++++++-------- .../dmauthmanagerv2_fuzzer/BUILD.gn | 1 + .../ondatareceivedv2_fuzzer/BUILD.gn | 1 + .../onbytesreceived_fuzzer/BUILD.gn | 1 + .../softbusconnector_fuzzer/BUILD.gn | 3 + .../softbusconnectorcommon_fuzzer/BUILD.gn | 3 + .../softbusconnectorpublish_fuzzer/BUILD.gn | 3 + .../softbusconnectorstate_fuzzer/BUILD.gn | 3 + .../softbusconnectorstatic_fuzzer/BUILD.gn | 3 + .../softbussession_fuzzer/BUILD.gn | 3 + .../softbussessionobject_fuzzer/BUILD.gn | 3 + 17 files changed, 211 insertions(+), 102 deletions(-) diff --git a/commondependency/include/deviceprofile_connector.h b/commondependency/include/deviceprofile_connector.h index 079761bc..e3a0946b 100644 --- a/commondependency/include/deviceprofile_connector.h +++ b/commondependency/include/deviceprofile_connector.h @@ -52,6 +52,7 @@ const uint32_t DM_SHARE = 2; const uint32_t DM_LNN = 3; const uint32_t DM_POINT_TO_POINT = 256; const uint32_t DM_ACROSS_ACCOUNT = 1282; +const int32_t DM_VERSION_5_1_0 = 510; enum ProfileState { INACTIVE = 0, @@ -265,8 +266,9 @@ public: bool ChecksumAcl(DistributedDeviceProfile::AccessControlProfile &acl, std::vector &acLStrList); std::string AccessToStr(DistributedDeviceProfile::AccessControlProfile acl); - int32_t GetAclListHashStr(const std::string localUdid, int32_t localUserId, - const std::string remoteUdid, int32_t remoteUserId, std::string dmVersion, std::string &aclList); + int32_t GetVersionByExtra(std::string &extraInfo, std::string &dmVersion); + void GetAllVerionAclMap(std::string &extraInfo, DistributedDeviceProfile::AccessControlProfile &acl, + std::map> &aclMap); int32_t GetAclListHashStr(const std::string localUdid, int32_t localUserId, const std::string remoteUdid, int32_t remoteUserId, std::string &aclList); bool IsLnnAcl(const DistributedDeviceProfile::AccessControlProfile &profile); diff --git a/commondependency/src/deviceprofile_connector.cpp b/commondependency/src/deviceprofile_connector.cpp index 69abebf4..b5a1e800 100644 --- a/commondependency/src/deviceprofile_connector.cpp +++ b/commondependency/src/deviceprofile_connector.cpp @@ -78,76 +78,89 @@ namespace { namespace OHOS { namespace DistributedHardware { DM_IMPLEMENT_SINGLE_INSTANCE(DeviceProfileConnector); -int32_t DeviceProfileConnector::GetAclListHashStr(const std::string localUdid, int32_t localUserId, - const std::string remoteUdid, int32_t remoteUserId, std::string &aclList) +int32_t DeviceProfileConnector::GetVersionByExtra(std::string &extraInfo, std::string &dmVersion) { - std::string extraInfo = ""; - std::vector profiles = - DeviceProfileConnector::GetInstance().GetAllAclIncludeLnnAcl(); - for (auto &item : profiles) { - if (item.GetAccesser().GetAccesserDeviceId() == localUdid && - item.GetAccesser().GetAccesserUserId() == localUserId && - item.GetAccessee().GetAccesseeDeviceId() == remoteUdid && - item.GetAccessee().GetAccesseeUserId() == remoteUserId) { - extraInfo = item.GetAccesser().GetAccesserExtraData(); - continue; - } - if (item.GetAccesser().GetAccesserDeviceId() == remoteUdid && - item.GetAccesser().GetAccesserUserId() == remoteUserId && - item.GetAccessee().GetAccesseeDeviceId() == localUdid && - item.GetAccessee().GetAccesseeUserId() == localUserId) { - extraInfo = item.GetAccessee().GetAccesseeExtraData(); - continue; - } - } JsonObject extraInfoJson(extraInfo); if (extraInfoJson.IsDiscarded()) { - LOGE("GetAclListHashStr extraInfoJson error"); + LOGE("GetVersionByExtra extraInfoJson error"); return ERR_DM_FAILED; } if (!extraInfoJson[TAG_DMVERSION].IsString()) { - LOGE("GetAclListHashStr PARAM_KEY_OS_VERSION error"); + LOGE("GetVersionByExtra PARAM_KEY_OS_VERSION error"); return ERR_DM_FAILED; } - std::string dmVersion = extraInfoJson[TAG_DMVERSION].Get(); - return GetAclListHashStr(localUdid, localUserId, remoteUdid, remoteUserId, dmVersion, aclList); + dmVersion = extraInfoJson[TAG_DMVERSION].Get(); + return DM_OK; } -int32_t DeviceProfileConnector::GetAclListHashStr(const std::string localUdid, int32_t localUserId, - const std::string remoteUdid, int32_t remoteUserId, std::string dmVersion, std::string &aclList) +void DeviceProfileConnector::GetAllVerionAclMap(std::string &extraInfo, + DistributedDeviceProfile::AccessControlProfile &acl, std::map> &aclMap) { - JsonObject jsonAclListObj; - jsonAclListObj[TAG_DMVERSION] = dmVersion; + std::string dmVersion = ""; + int32_t ret = GetVersionByExtra(extraInfo, dmVersion); + if (ret != DM_OK) { + LOGE("GetVersionByExtra error"); + return; + } + int32_t versionNum = 0; + if (!GetVersionNumber(dmVersion, versionNum)) { + LOGE("GetAllVerionAclMap GetVersionNumber error"); + return; + } + std::string aclStr = ""; + switch (versionNum) { + case DM_VERSION_5_1_0: + aclStr = AccessToStr(acl); + break; + default: + LOGE("versionNum is invaild"); + break; + } + auto iter = aclMap.find(dmVersion); + if (iter != aclMap.end()) { + aclMap[dmVersion].push_back(Crypto::Sha256(aclStr)); + } else { + std::vector aclStrVec; + aclStrVec.push_back(Crypto::Sha256(aclStr)); + aclMap[dmVersion] = aclStrVec; + } + return; +} - // Query ACL. +int32_t DeviceProfileConnector::GetAclListHashStr(const std::string localUdid, int32_t localUserId, + const std::string remoteUdid, int32_t remoteUserId, std::string &aclList) +{ + std::map> aclMap; std::vector profiles = DeviceProfileConnector::GetInstance().GetAllAclIncludeLnnAcl(); - std::vector aclStrVec; - // Traverse the ACL table to find historical ACL records at both ends. for (auto &item : profiles) { if (item.GetAccesser().GetAccesserDeviceId() == localUdid && item.GetAccesser().GetAccesserUserId() == localUserId && item.GetAccessee().GetAccesseeDeviceId() == remoteUdid && item.GetAccessee().GetAccesseeUserId() == remoteUserId) { - std::string aclStr = AccessToStr(item); - aclStrVec.push_back(Crypto::Sha256(aclStr)); + std::string extraInfo = item.GetAccesser().GetAccesserExtraData(); + GetAllVerionAclMap(extraInfo, item, aclMap); continue; } if (item.GetAccesser().GetAccesserDeviceId() == remoteUdid && item.GetAccesser().GetAccesserUserId() == remoteUserId && item.GetAccessee().GetAccesseeDeviceId() == localUdid && item.GetAccessee().GetAccesseeUserId() == localUserId) { - std::string aclStr = AccessToStr(item); - aclStrVec.push_back(Crypto::Sha256(aclStr)); + std::string extraInfo = item.GetAccessee().GetAccesseeExtraData(); + GetAllVerionAclMap(extraInfo, item, aclMap); continue; } } - if (aclStrVec.empty()) { + if (aclMap.empty()) { LOGI("DeviceProfileConnector:: acl list is empty"); } - - jsonAclListObj[TAG_ACL] = aclStrVec; - aclList = jsonAclListObj.Dump(); + std::vector aclStrVec; + for (auto &item : aclMap) { + aclStrVec.push_back({item.first, item.second}); + } + JsonObject allAclObj(JsonCreateType::JSON_CREATE_TYPE_ARRAY); + ToJson(allAclObj, aclStrVec); + aclList = allAclObj.Dump(); return DM_OK; } diff --git a/json/include/json_object.h b/json/include/json_object.h index 9b91ddf8..7aaf1322 100644 --- a/json/include/json_object.h +++ b/json/include/json_object.h @@ -21,6 +21,10 @@ namespace OHOS { namespace DistributedHardware { +struct AclHashItem { + std::string version; + std::vector aclHashList; +}; class JsonObject; class JsonItemObject { friend void ToJson(JsonItemObject &itemObject, const std::string &value); @@ -166,6 +170,8 @@ void ToJson(JsonItemObject &itemObject, const int32_t &value); void ToJson(JsonItemObject &itemObject, const uint32_t &value); void ToJson(JsonItemObject &itemObject, const int64_t &value); void ToJson(JsonItemObject &itemObject, const uint64_t &value); +void ToJson(JsonItemObject &itemObject, const AclHashItem &value); +void ToJson(JsonItemObject &itemObject, const std::vector &values); void FromJson(const JsonItemObject &itemObject, std::string &value); void FromJson(const JsonItemObject &itemObject, double &value); void FromJson(const JsonItemObject &itemObject, bool &value); @@ -176,6 +182,8 @@ void FromJson(const JsonItemObject &itemObject, int32_t &value); void FromJson(const JsonItemObject &itemObject, uint32_t &value); void FromJson(const JsonItemObject &itemObject, int64_t &value); void FromJson(const JsonItemObject &itemObject, uint64_t &value); +void FromJson(const JsonItemObject &itemObject, AclHashItem &value); +void FromJson(const JsonItemObject &itemObject, std::vector &values); std::string ToString(const JsonItemObject &jsonItem); } // namespace DistributedHardware } // namespace OHOS diff --git a/json/src/json_object_nlohmannjson.cpp b/json/src/json_object_nlohmannjson.cpp index a834dfdb..956317fe 100644 --- a/json/src/json_object_nlohmannjson.cpp +++ b/json/src/json_object_nlohmannjson.cpp @@ -18,6 +18,9 @@ #include "nlohmann/json.hpp" #include "dm_log.h" +const char* TAG_ACL_HASH_KEY_VERSION = "aclVersion"; +const char* TAG_ACL_HASH_KEY_ACLHASHLIST = "aclHashList"; + namespace OHOS { namespace DistributedHardware { static nlohmann::json *GetJsonPointer(void *pointer) @@ -102,6 +105,25 @@ void ToJson(JsonItemObject &itemObject, const uint64_t &value) } } +void ToJson(JsonItemObject &itemObject, const AclHashItem &value) +{ + itemObject[TAG_ACL_HASH_KEY_VERSION] = value.version; + JsonObject hashList(JsonCreateType::JSON_CREATE_TYPE_ARRAY); + for (const auto &val : value.aclHashList) { + hashList.PushBack(val); + } + itemObject[TAG_ACL_HASH_KEY_ACLHASHLIST] = hashList.Dump(); +} + +void ToJson(JsonItemObject &itemObject, const std::vector &values) +{ + for (const auto &val : values) { + JsonObject object; + ToJson(object, val); + itemObject.PushBack(object.Dump()); + } +} + void FromJson(const JsonItemObject &itemObject, std::string &value) { itemObject.GetTo(value); @@ -162,6 +184,28 @@ void FromJson(const JsonItemObject &itemObject, uint64_t &value) value = static_cast(tmpValue); } +void FromJson(const JsonItemObject &itemObject, AclHashItem &value) +{ + value.version = itemObject[TAG_ACL_HASH_KEY_VERSION].Get(); + std::string hashListStr = itemObject[TAG_ACL_HASH_KEY_ACLHASHLIST].Get(); + JsonObject hashList; + hashList.Parse(hashListStr); + for (auto const &item : hashList.Items()) { + value.aclHashList.push_back(item.Get()); + } +} + +void FromJson(const JsonItemObject &itemObject, std::vector &values) +{ + for (auto const &item : itemObject.Items()) { + JsonObject object; + AclHashItem aclItem; + object.Parse(item.Get()); + FromJson(object, aclItem); + values.push_back(aclItem); + } +} + std::string ToString(const JsonItemObject &jsonItem) { return jsonItem.Dump(); diff --git a/services/implementation/include/dependency/softbus/softbus_connector.h b/services/implementation/include/dependency/softbus/softbus_connector.h index f7c2acc8..75746cdc 100644 --- a/services/implementation/include/dependency/softbus/softbus_connector.h +++ b/services/implementation/include/dependency/softbus/softbus_connector.h @@ -28,6 +28,7 @@ #include "dm_publish_info.h" #include "dm_subscribe_info.h" #if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) +#include "deviceprofile_connector.h" #include "softbus_session.h" #endif #include "softbus_connector_callback.h" @@ -144,10 +145,11 @@ private: static ConnectionAddr *GetConnectAddrByType(DeviceInfo *deviceInfo, ConnectionAddrType type); static void ConvertNodeBasicInfoToDmDevice(const NodeBasicInfo &nodeBasicInfo, DmDeviceInfo &dmDeviceInfo); static std::shared_ptr GetDeviceInfoFromMap(const std::string &deviceId); - int32_t ParaseAclChecksumList(const std::string &jsonString, std::string &dmVersion, - std::vector &remoteAclList); - int32_t SyncLocalAclList5_1_0(const std::string localUdid, int32_t localUserId, - const std::string remoteUdid, int32_t remoteUserId, std::vector remoteAclList); + int32_t ParaseAclChecksumList(const std::string &jsonString, std::vector &remoteAllAclList); + int32_t SyncLocalAclList5_1_0(const std::string localUdid, const std::string remoteUdid, + DistributedDeviceProfile::AccessControlProfile &localAcl, std::vector &acLStrList); + int32_t GetLocalVersion(const std::string localUdid, const std::string remoteUdid, + std::string &localVersion, DistributedDeviceProfile::AccessControlProfile &localAcl); private: static std::string remoteUdidHash_; diff --git a/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp b/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp index c6403f7d..72298e1f 100644 --- a/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp +++ b/services/implementation/src/authentication_v2/dm_auth_message_processor.cpp @@ -1336,7 +1336,7 @@ int32_t DmAuthMessageProcessor::EncryptSyncMessage(std::shared_ptraccesser.deviceId == localUdid) ? context->accessee : context->accesser; std::string aclHashList; int32_t ret = DeviceProfileConnector::GetInstance().GetAclListHashStr(localUdid, access.userId, - remoteAccess.deviceId, remoteAccess.userId, accessSide.dmVersion, aclHashList); + remoteAccess.deviceId, remoteAccess.userId, aclHashList); if (ret != DM_OK) { LOGE("DmAuthMessageProcessor::EncryptSyncMessage GetAclListHashStr failed"); return ERR_DM_FAILED; diff --git a/services/implementation/src/dependency/softbus/softbus_connector.cpp b/services/implementation/src/dependency/softbus/softbus_connector.cpp index 7fc65577..9fde3931 100644 --- a/services/implementation/src/dependency/softbus/softbus_connector.cpp +++ b/services/implementation/src/dependency/softbus/softbus_connector.cpp @@ -28,16 +28,12 @@ #include "json_object.h" #include "parameter.h" #include "system_ability_definition.h" -#if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) -#include "deviceprofile_connector.h" -#endif namespace OHOS { namespace DistributedHardware { const int32_t SOFTBUS_SUBSCRIBE_ID_MASK = 0x0000FFFF; const int32_t SOFTBUS_DISCOVER_DEVICE_INFO_MAX_SIZE = 100; const int32_t SOFTBUS_TRUSTDEVICE_UUIDHASH_INFO_MAX_SIZE = 100; -const int32_t DM_VERSION_5_1_0 = 510; constexpr const char* WIFI_IP = "WIFI_IP"; constexpr const char* WIFI_PORT = "WIFI_PORT"; @@ -96,31 +92,27 @@ void SoftbusConnector::SyncAclList(int32_t userId, std::string credId, #endif } -int32_t SoftbusConnector::SyncLocalAclList5_1_0(const std::string localUdid, int32_t localUserId, - const std::string remoteUdid, int32_t remoteUserId, std::vector remoteAclList) +int32_t SoftbusConnector::SyncLocalAclList5_1_0(const std::string localUdid, const std::string remoteUdid, + DistributedDeviceProfile::AccessControlProfile &localAcl, std::vector &acLStrList) { #if !(defined(__LITEOS_M__) || defined(LITE_DEVICE)) - std::vector localAclList = - DeviceProfileConnector::GetInstance().GetAclList(localUdid, localUserId, remoteUdid, remoteUserId); - for (auto &localAcl : localAclList) { - bool res = DeviceProfileConnector::GetInstance().ChecksumAcl(localAcl, remoteAclList); - if (res) { - continue; - } - if (localAcl.GetAccesser().GetAccesserDeviceId() == localUdid && - localAcl.GetAccessee().GetAccesseeDeviceId() == remoteUdid) { - LOGI("SyncLocalAclListProcess Src."); - SyncAclList(localAcl.GetAccesser().GetAccesserUserId(), - localAcl.GetAccesser().GetAccesserCredentialIdStr(), - localAcl.GetAccesser().GetAccesserSessionKeyId(), localAcl.GetAccessControlId()); - } - if (localAcl.GetAccesser().GetAccesserDeviceId() == remoteUdid && - localAcl.GetAccessee().GetAccesseeDeviceId() == localUdid) { - LOGI("SyncLocalAclListProcess Sink."); - SyncAclList(localAcl.GetAccessee().GetAccesseeUserId(), - localAcl.GetAccessee().GetAccesseeCredentialIdStr(), - localAcl.GetAccessee().GetAccesseeSessionKeyId(), localAcl.GetAccessControlId()); - } + bool res = DeviceProfileConnector::GetInstance().ChecksumAcl(localAcl, acLStrList); + if (res) { + return DM_OK; + } + if (localAcl.GetAccesser().GetAccesserDeviceId() == localUdid && + localAcl.GetAccessee().GetAccesseeDeviceId() == remoteUdid) { + LOGI("SyncLocalAclListProcess Src."); + SyncAclList(localAcl.GetAccesser().GetAccesserUserId(), + localAcl.GetAccesser().GetAccesserCredentialIdStr(), + localAcl.GetAccesser().GetAccesserSessionKeyId(), localAcl.GetAccessControlId()); + } + if (localAcl.GetAccesser().GetAccesserDeviceId() == remoteUdid && + localAcl.GetAccessee().GetAccesseeDeviceId() == localUdid) { + LOGI("SyncLocalAclListProcess Sink."); + SyncAclList(localAcl.GetAccessee().GetAccesseeUserId(), + localAcl.GetAccessee().GetAccesseeCredentialIdStr(), + localAcl.GetAccessee().GetAccesseeSessionKeyId(), localAcl.GetAccessControlId()); } return DM_OK; #else @@ -133,50 +125,74 @@ int32_t SoftbusConnector::SyncLocalAclList5_1_0(const std::string localUdid, int #endif } -int32_t SoftbusConnector::ParaseAclChecksumList(const std::string &jsonString, std::string &dmVersion, - std::vector &remoteAclList) +int32_t SoftbusConnector::ParaseAclChecksumList(const std::string &jsonString, + std::vector &remoteAllAclList) { - JsonObject aclChecksumjson(jsonString); + JsonObject aclChecksumjson(JsonCreateType::JSON_CREATE_TYPE_ARRAY); + aclChecksumjson.Parse(jsonString); if (aclChecksumjson.IsDiscarded()) { LOGE("ParseSyncMessage aclChecksumjson error"); return ERR_DM_FAILED; } - if (!aclChecksumjson[TAG_DMVERSION].IsString()) { - LOGE("ParseSyncMessage TAG_DMVERSION error"); - return ERR_DM_FAILED; - } - dmVersion = aclChecksumjson[TAG_DMVERSION].Get(); - if (!aclChecksumjson[TAG_ACL].IsArray()) { - LOGE("ParseSyncMessage TAG_ACL error"); - return ERR_DM_FAILED; + FromJson(aclChecksumjson, remoteAllAclList); + return DM_OK; +} + +int32_t SoftbusConnector::GetLocalVersion(const std::string localUdid, const std::string remoteUdid, + std::string &localVersion, DistributedDeviceProfile::AccessControlProfile &localAcl) +{ + int32_t ret = ERR_DM_FAILED; + if (localAcl.GetAccesser().GetAccesserDeviceId() == localUdid && + localAcl.GetAccessee().GetAccesseeDeviceId() == remoteUdid) { + std::string extraInfo = localAcl.GetAccesser().GetAccesserExtraData(); + ret = DeviceProfileConnector::GetInstance().GetVersionByExtra(extraInfo, localVersion); + } else if (localAcl.GetAccesser().GetAccesserDeviceId() == remoteUdid && + localAcl.GetAccessee().GetAccesseeDeviceId() == localUdid) { + std::string extraInfo = localAcl.GetAccessee().GetAccesseeExtraData(); + ret = DeviceProfileConnector::GetInstance().GetVersionByExtra(extraInfo, localVersion); } - aclChecksumjson[TAG_ACL].Get(remoteAclList); return DM_OK; } + int32_t SoftbusConnector::SyncLocalAclListProcess(const std::string localUdid, int32_t localUserId, const std::string remoteUdid, int32_t remoteUserId, std::string remoteAclList) { - std::string dmVersion = ""; - std::vector remoteAclListVec; - int32_t ret = ParaseAclChecksumList(remoteAclList, dmVersion, remoteAclListVec); + std::vector remoteAllAclList; + int32_t ret = ParaseAclChecksumList(remoteAclList, remoteAllAclList); if (ret != DM_OK) { - LOGE("ParaseAclChecksumList TAG_ACL and dmversion error"); + LOGE("SyncLocalAclListProcess TAG_ACL error"); return ret; } - int32_t versionNum = 0; - if (!GetVersionNumber(dmVersion, versionNum)) { - LOGE("ParaseAclChecksumList GetVersionNumber error"); - return ERR_DM_FAILED; - } - switch (versionNum) { - case DM_VERSION_5_1_0: - return SyncLocalAclList5_1_0(localUdid, localUserId, remoteUdid, remoteUserId, remoteAclListVec); - default: - LOGE("versionNum is invaild"); - break; + std::vector localAclList = + DeviceProfileConnector::GetInstance().GetAclList(localUdid, localUserId, remoteUdid, remoteUserId); + std::vector acLStrList; + for (auto &localAcl : localAclList) { + std::string localVersion = ""; + ret = GetLocalVersion(localUdid, remoteUdid, localVersion, localAcl); + if (ret != DM_OK) { + continue; + } + for (auto item : remoteAllAclList) { + if (item.version == localVersion) { + acLStrList = item.aclHashList; + break; + } + } + int32_t versionNum = 0; + if (!GetVersionNumber(localVersion, versionNum)) { + LOGE("SyncLocalAclList GetVersionNumber error"); + continue; + } + switch (versionNum) { + case DM_VERSION_5_1_0: + ret = SyncLocalAclList5_1_0(localUdid, remoteUdid, localAcl, acLStrList); + default: + LOGE("versionNum is invaild"); + break; + } } - return ERR_DM_FAILED; + return DM_OK; } int32_t SoftbusConnector::GetAclListHash(const std::string localUdid, int32_t localUserId, diff --git a/test/commonfuzztest/dmauthmanagerv2_fuzzer/BUILD.gn b/test/commonfuzztest/dmauthmanagerv2_fuzzer/BUILD.gn index 0fa5945e..fb2de39c 100644 --- a/test/commonfuzztest/dmauthmanagerv2_fuzzer/BUILD.gn +++ b/test/commonfuzztest/dmauthmanagerv2_fuzzer/BUILD.gn @@ -59,6 +59,7 @@ ohos_fuzztest("DmAuthManagerV2FuzzTest") { "dsoftbus:softbus_client", "ffrt:libffrt", "hilog:libhilog", + "init:libbegetutil", "ipc:ipc_single", "safwk:system_ability_fwk", ] diff --git a/test/commonfuzztest/ondatareceivedv2_fuzzer/BUILD.gn b/test/commonfuzztest/ondatareceivedv2_fuzzer/BUILD.gn index ba39ee5c..b81e1b47 100644 --- a/test/commonfuzztest/ondatareceivedv2_fuzzer/BUILD.gn +++ b/test/commonfuzztest/ondatareceivedv2_fuzzer/BUILD.gn @@ -58,6 +58,7 @@ ohos_fuzztest("OnDataReceivedV2FuzzTest") { "dsoftbus:softbus_client", "ffrt:libffrt", "hilog:libhilog", + "init:libbegetutil", "ipc:ipc_single", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/onbytesreceived_fuzzer/BUILD.gn b/test/softbusfuzztest/onbytesreceived_fuzzer/BUILD.gn index 50307cab..872e0c8a 100644 --- a/test/softbusfuzztest/onbytesreceived_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/onbytesreceived_fuzzer/BUILD.gn @@ -62,6 +62,7 @@ ohos_fuzztest("OnBytesReceivedFuzzTest") { "device_info_manager:distributed_device_profile_common", "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/softbusconnector_fuzzer/BUILD.gn b/test/softbusfuzztest/softbusconnector_fuzzer/BUILD.gn index a0f55727..7e97b59b 100644 --- a/test/softbusfuzztest/softbusconnector_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/softbusconnector_fuzzer/BUILD.gn @@ -53,7 +53,10 @@ ohos_fuzztest("SoftbusConnectorFuzzTest") { external_deps = [ "bounds_checking_function:libsec_shared", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/softbusconnectorcommon_fuzzer/BUILD.gn b/test/softbusfuzztest/softbusconnectorcommon_fuzzer/BUILD.gn index c81460d7..a56aedb4 100644 --- a/test/softbusfuzztest/softbusconnectorcommon_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/softbusconnectorcommon_fuzzer/BUILD.gn @@ -53,7 +53,10 @@ ohos_fuzztest("SoftbusConnectorCommonFuzzTest") { external_deps = [ "bounds_checking_function:libsec_shared", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/softbusconnectorpublish_fuzzer/BUILD.gn b/test/softbusfuzztest/softbusconnectorpublish_fuzzer/BUILD.gn index ea4a9575..c2ffe9e8 100644 --- a/test/softbusfuzztest/softbusconnectorpublish_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/softbusconnectorpublish_fuzzer/BUILD.gn @@ -52,7 +52,10 @@ ohos_fuzztest("SoftbusConnectorPublishFuzzTest") { external_deps = [ "bounds_checking_function:libsec_shared", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/softbusconnectorstate_fuzzer/BUILD.gn b/test/softbusfuzztest/softbusconnectorstate_fuzzer/BUILD.gn index 97927543..5f02b991 100644 --- a/test/softbusfuzztest/softbusconnectorstate_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/softbusconnectorstate_fuzzer/BUILD.gn @@ -53,7 +53,10 @@ ohos_fuzztest("SoftbusConnectorStateFuzzTest") { external_deps = [ "bounds_checking_function:libsec_shared", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/softbusconnectorstatic_fuzzer/BUILD.gn b/test/softbusfuzztest/softbusconnectorstatic_fuzzer/BUILD.gn index 40169545..402cd734 100644 --- a/test/softbusfuzztest/softbusconnectorstatic_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/softbusconnectorstatic_fuzzer/BUILD.gn @@ -53,7 +53,10 @@ ohos_fuzztest("SoftbusConnectorStaticFuzzTest") { external_deps = [ "bounds_checking_function:libsec_shared", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/softbussession_fuzzer/BUILD.gn b/test/softbusfuzztest/softbussession_fuzzer/BUILD.gn index afb64d50..7ece9eef 100644 --- a/test/softbusfuzztest/softbussession_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/softbussession_fuzzer/BUILD.gn @@ -53,7 +53,10 @@ ohos_fuzztest("SoftbusSessionFuzzTest") { external_deps = [ "bounds_checking_function:libsec_shared", "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] diff --git a/test/softbusfuzztest/softbussessionobject_fuzzer/BUILD.gn b/test/softbusfuzztest/softbussessionobject_fuzzer/BUILD.gn index d42fa8b7..7f61cc16 100644 --- a/test/softbusfuzztest/softbussessionobject_fuzzer/BUILD.gn +++ b/test/softbusfuzztest/softbussessionobject_fuzzer/BUILD.gn @@ -54,7 +54,10 @@ ohos_fuzztest("SoftbusSessionObjectFuzzTest") { external_deps = [ "device_auth:deviceauth_sdk", + "device_info_manager:distributed_device_profile_common", + "device_info_manager:distributed_device_profile_sdk", "dsoftbus:softbus_client", + "init:libbegetutil", "safwk:system_ability_fwk", ] -- Gitee