diff --git a/bundle.json b/bundle.json index f726ee71c84c0c228f6dba4f83660ed9992b734b..8b898570193d2f7d3acd3bb396f20d8c793bb717 100644 --- a/bundle.json +++ b/bundle.json @@ -94,8 +94,7 @@ "openssl", "json", "dmsfwk", - "data_object", - "init" + "data_object" ], "third_party": [ "libuv", diff --git a/services/distributeddataservice/service/data_share/BUILD.gn b/services/distributeddataservice/service/data_share/BUILD.gn index 788eceec20f2224e530a7c8ab12c7646d772dd0a..f39ed7a352025105123f426dfcf3974d0ed09567 100644 --- a/services/distributeddataservice/service/data_share/BUILD.gn +++ b/services/distributeddataservice/service/data_share/BUILD.gn @@ -130,7 +130,6 @@ ohos_source_set("data_share_service") { "hicollie:libhicollie", "hilog:libhilog", "hisysevent:libhisysevent", - "init:libbegetutil", "ipc:ipc_core", "json:nlohmann_json_static", "kv_store:datamgr_common", diff --git a/services/distributeddataservice/service/data_share/data_share_service_impl.cpp b/services/distributeddataservice/service/data_share/data_share_service_impl.cpp index 0b3e7c81b499d48ccdcf57dac0174ae10c8379ca..75730097cd485b623cd26b114e29bc4693dd7e54 100644 --- a/services/distributeddataservice/service/data_share/data_share_service_impl.cpp +++ b/services/distributeddataservice/service/data_share/data_share_service_impl.cpp @@ -60,7 +60,6 @@ #include "utils/anonymous.h" #include "xcollie.h" #include "log_debug.h" -#include "parameters.h" #include "dataproxy_handle_common.h" #include "proxy_data_manager.h" #include "datashare_observer.h" @@ -1144,8 +1143,7 @@ bool DataShareServiceImpl::VerifyAcrossAccountsPermission(int32_t currentUserId, if (currentUserId == 0 || currentUserId == visitedUserId) { return true; } - return system::GetBoolParameter(CONNECT_SUPPORT_CROSS_USER, false) && - PermitDelegate::VerifyPermission(acrossAccountsPermission, callerTokenId); + return PermitDelegate::VerifyPermission(acrossAccountsPermission, callerTokenId); } std::pair DataShareServiceImpl::ExecuteEx(const std::string &uri, const std::string &extUri, diff --git a/services/distributeddataservice/service/data_share/data_share_service_impl.h b/services/distributeddataservice/service/data_share/data_share_service_impl.h index 41b2965e584bdcb1b660c8659e854106e9678da8..c86cf2fa26163fe1dae231d1ce204d46df9717f4 100644 --- a/services/distributeddataservice/service/data_share/data_share_service_impl.h +++ b/services/distributeddataservice/service/data_share/data_share_service_impl.h @@ -160,7 +160,6 @@ private: static constexpr const char *PROXY_URI_SCHEMA = "datashareproxy"; static constexpr const char *EXT_URI_SCHEMA = "datashare://"; static constexpr const char *NO_PERMISSION = "noPermission"; - static constexpr const char *CONNECT_SUPPORT_CROSS_USER = "const.abilityms.connect_support_cross_user"; PublishStrategy publishStrategy_; GetDataStrategy getDataStrategy_; SubscribeStrategy subscribeStrategy_; diff --git a/services/distributeddataservice/service/test/fuzztest/datashareserviceimpl_fuzzer/BUILD.gn b/services/distributeddataservice/service/test/fuzztest/datashareserviceimpl_fuzzer/BUILD.gn index baa4fa6efdd1a20dfbe11b2d162431452b184ad8..22cb65f5eabc12299009aa89a9c72b7fd14d7bce 100644 --- a/services/distributeddataservice/service/test/fuzztest/datashareserviceimpl_fuzzer/BUILD.gn +++ b/services/distributeddataservice/service/test/fuzztest/datashareserviceimpl_fuzzer/BUILD.gn @@ -98,6 +98,7 @@ ohos_fuzztest("DataShareServiceImplFuzzTest") { "${data_service_path}/service/data_share/sys_event_subscriber.cpp", "${data_service_path}/service/kvdb/user_delegate.cpp", "${data_service_path}/service/permission/src/permit_delegate.cpp", + "${data_service_path}/service/permission/src/permission_validator.cpp", "datashareserviceimpl_fuzzer.cpp", ] diff --git a/services/distributeddataservice/service/test/fuzztest/datashareservicestub_fuzzer/BUILD.gn b/services/distributeddataservice/service/test/fuzztest/datashareservicestub_fuzzer/BUILD.gn index 5824983758ed23c0ab72fde32937e49601f7e9c2..2b158d7b0a95be9140237aabefa3c2909174fe55 100644 --- a/services/distributeddataservice/service/test/fuzztest/datashareservicestub_fuzzer/BUILD.gn +++ b/services/distributeddataservice/service/test/fuzztest/datashareservicestub_fuzzer/BUILD.gn @@ -96,6 +96,7 @@ ohos_fuzztest("DataShareServiceStubFuzzTest") { "${data_service_path}/service/data_share/sys_event_subscriber.cpp", "${data_service_path}/service/kvdb/user_delegate.cpp", "${data_service_path}/service/permission/src/permit_delegate.cpp", + "${data_service_path}/service/permission/src/permission_validator.cpp", "datashareservicestub_fuzzer.cpp", ] @@ -126,7 +127,6 @@ ohos_fuzztest("DataShareServiceStubFuzzTest") { "hilog:libhilog", "hisysevent:libhisysevent", "huks:libhukssdk", - "init:libbegetutil", "ipc:ipc_core", "kv_store:distributeddata_inner", "kv_store:distributeddb",