diff --git a/frameworks/js/napi/ethernet/BUILD.gn b/frameworks/js/napi/ethernet/BUILD.gn index f7fd5d38e79d00774f10d748108df1a9e17c9cbd..c27f54dde206cabf1f6d06e96fbcb642a4d4190a 100644 --- a/frameworks/js/napi/ethernet/BUILD.gn +++ b/frameworks/js/napi/ethernet/BUILD.gn @@ -45,13 +45,11 @@ ohos_shared_library("ethernet") { defines = [ "NETMGR_DEBUG" ] cflags = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] diff --git a/frameworks/js/napi/ethernet/customeap/BUILD.gn b/frameworks/js/napi/ethernet/customeap/BUILD.gn index de93bd59392558f6f6b845e8f815b065f9951941..915d0b0855fa6ed6d7740dc979429b40d8793751 100644 --- a/frameworks/js/napi/ethernet/customeap/BUILD.gn +++ b/frameworks/js/napi/ethernet/customeap/BUILD.gn @@ -37,13 +37,11 @@ ohos_shared_library("eap") { ] cflags = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] diff --git a/frameworks/js/napi/mdns/BUILD.gn b/frameworks/js/napi/mdns/BUILD.gn index 8eeed96f81f3398a58b3c642ee198dbb1e985e7d..7d13518b0d9eb9564d39c08a48c2ce39766f8afc 100644 --- a/frameworks/js/napi/mdns/BUILD.gn +++ b/frameworks/js/napi/mdns/BUILD.gn @@ -20,13 +20,11 @@ config("mdns_config") { visibility = [ ":mdns" ] cflags = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] diff --git a/frameworks/js/napi/netfirewall/BUILD.gn b/frameworks/js/napi/netfirewall/BUILD.gn index 90f3aa62798a5a7df8cbe6c9286f01740f6d2977..8f17f4072c754562574eb1451f93c41e99c8d74f 100755 --- a/frameworks/js/napi/netfirewall/BUILD.gn +++ b/frameworks/js/napi/netfirewall/BUILD.gn @@ -19,6 +19,8 @@ ohos_shared_library("netfirewall") { debug = false } + branch_protector_ret = "pac_ret" + include_dirs = [ "include", "include/context", @@ -41,13 +43,11 @@ ohos_shared_library("netfirewall") { ] cflags = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] diff --git a/frameworks/js/napi/sharing/BUILD.gn b/frameworks/js/napi/sharing/BUILD.gn index 6963a92f13add03c444fef20139427d4687c4777..2e5a55f42693c7aade71bdfc4b27122a7bc766ac 100644 --- a/frameworks/js/napi/sharing/BUILD.gn +++ b/frameworks/js/napi/sharing/BUILD.gn @@ -19,13 +19,11 @@ config("sharing_config") { include_dirs = [ "include" ] cflags = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] diff --git a/frameworks/js/napi/vpn/BUILD.gn b/frameworks/js/napi/vpn/BUILD.gn index 7eb7101938485b04ea2446843d40dbfb071b04b2..d7217c638a79aa5beeedce59cc03157b9b841374 100644 --- a/frameworks/js/napi/vpn/BUILD.gn +++ b/frameworks/js/napi/vpn/BUILD.gn @@ -44,13 +44,11 @@ ohos_shared_library("vpn") { ] cflags = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] cflags_cc = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-O2", ] diff --git a/frameworks/native/netshareclient/src/proxy/ipccallback/netshare_result_callback_proxy.cpp b/frameworks/native/netshareclient/src/proxy/ipccallback/netshare_result_callback_proxy.cpp deleted file mode 100644 index 59a00efcf847574f10baea1d14b7752d5835448b..0000000000000000000000000000000000000000 --- a/frameworks/native/netshareclient/src/proxy/ipccallback/netshare_result_callback_proxy.cpp +++ /dev/null @@ -1,55 +0,0 @@ -/* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "netshare_result_callback_proxy.h" - -#include "ipc_types.h" -#include "parcel.h" -#include "net_manager_constants.h" -#include "netmgr_ext_log_wrapper.h" -#include "networkshare_constants.h" - -namespace OHOS { -namespace NetManagerStandard { -NetShareResultCallbackProxy::NetShareResultCallbackProxy(const sptr &object) - : IRemoteProxy(object) -{ -} - -void NetShareResultCallbackProxy::OnResult(const int32_t &result) -{ - sptr remote = Remote(); - if (remote == nullptr) { - NETMGR_EXT_LOG_E("NetShareResultCallbackProxy get Remote() error."); - return; - } - - MessageParcel data; - MessageParcel reply; - MessageOption option; - data.WriteInterfaceToken(INetShareResultCallback::GetDescriptor()); - - if (!data.WriteInt32(result)) { - NETMGR_EXT_LOG_E("NetShareResultCallbackProxy WriteInt32 error."); - return; - } - int32_t ret = - remote->SendRequest(static_cast(TetheringResultInterfaceCode::RESULT), data, reply, option); - if (ret != NETMANAGER_EXT_SUCCESS) { - NETMGR_EXT_LOG_E("NetShareResultCallbackProxy SendRequest error=[%{public}d].", ret); - } -} -} // namespace NetManagerStandard -} // namespace OHOS diff --git a/frameworks/native/netshareclient/src/proxy/ipccallback/netshare_result_callback_stub.cpp b/frameworks/native/netshareclient/src/proxy/ipccallback/netshare_result_callback_stub.cpp deleted file mode 100644 index cfc966773f907e842406919d54be1d7eafd7e5ef..0000000000000000000000000000000000000000 --- a/frameworks/native/netshareclient/src/proxy/ipccallback/netshare_result_callback_stub.cpp +++ /dev/null @@ -1,40 +0,0 @@ -/* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#include "netshare_result_callback_stub.h" - -#include "string_ex.h" -#include "net_manager_constants.h" -#include "networkshare_constants.h" - -namespace OHOS { -namespace NetManagerStandard { -int32_t NetShareResultCallbackStub::OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, - MessageOption &option) -{ - std::u16string descriptor = data.ReadInterfaceToken(); - if (descriptor != INetShareResultCallback::GetDescriptor()) { - return NETMANAGER_EXT_ERR_DESCRIPTOR_MISMATCH; - } - TetheringResultInterfaceCode msgCode = static_cast(code); - if (msgCode == TetheringResultInterfaceCode::RESULT) { - int32_t status = data.ReadInt32(); - OnResult(status); - return NETMANAGER_EXT_SUCCESS; - } - return IPCObjectStub::OnRemoteRequest(code, data, reply, option); -} -} // namespace NetManagerStandard -} // namespace OHOS diff --git a/interfaces/innerkits/ethernetclient/BUILD.gn b/interfaces/innerkits/ethernetclient/BUILD.gn index c5ccededdc866a0edf73aab51ec364789510da7e..c222ae7d060c032459351ce84bff5111079154ff 100644 --- a/interfaces/innerkits/ethernetclient/BUILD.gn +++ b/interfaces/innerkits/ethernetclient/BUILD.gn @@ -99,6 +99,7 @@ ohos_static_library("ethernet_service_interface_stub") { cfi_cross_dso = true debug = false } + branch_protector_ret = "pac_ret" public_configs = [ ":ethernet_service_interface_stub_config" ] output_values = get_target_outputs(":ethernet_service_interface") sources = [] @@ -130,7 +131,6 @@ ohos_shared_library("ethernet_manager_if") { sources = [ "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/ethernet_client.cpp", "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/net_eap_callback_stub.cpp", - "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/interface_state_callback_proxy.cpp", "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/interface_state_callback_stub.cpp", ] diff --git a/interfaces/innerkits/mdnsclient/BUILD.gn b/interfaces/innerkits/mdnsclient/BUILD.gn index 9b29f20079e5a4c1010ceab6a12771562d378d5f..2032f3b73d31166f5469fcf8534cd796cdd5f56d 100644 --- a/interfaces/innerkits/mdnsclient/BUILD.gn +++ b/interfaces/innerkits/mdnsclient/BUILD.gn @@ -93,6 +93,7 @@ ohos_static_library("mdns_service_interface_stub") { cfi_cross_dso = true debug = false } + branch_protector_ret = "pac_ret" public_configs = [ ":mdns_service_interface_stub_config" ] output_values = get_target_outputs(":mdns_service_interface") sources = [] diff --git a/interfaces/innerkits/netfirewallclient/BUILD.gn b/interfaces/innerkits/netfirewallclient/BUILD.gn index 83e0e84856edfc41162ac88686ccc1fc27073c48..021aed11f869d45bc65788404cb213fb4c8f3139 100755 --- a/interfaces/innerkits/netfirewallclient/BUILD.gn +++ b/interfaces/innerkits/netfirewallclient/BUILD.gn @@ -46,7 +46,7 @@ ohos_static_library("netfirewall_parcel") { cfi_cross_dso = true debug = false } - + branch_protector_ret = "pac_ret" sources = [ "$NETFIREWALL_EXTENSION_SOURCE_DIR/src/netfirewall_common.cpp" ] include_dirs = [ @@ -73,6 +73,8 @@ ohos_shared_library("netfirewall_manager_if") { debug = false } + branch_protector_ret = "pac_ret" + if (netmanager_ext_feature_net_firewall) { sources = [ "$NETFIREWALL_EXTENSION_SOURCE_DIR/src/netfirewall_client.cpp", diff --git a/interfaces/innerkits/netshareclient/BUILD.gn b/interfaces/innerkits/netshareclient/BUILD.gn index 073b83933afeeb4ad0ae64dbff430e1f8508a24d..e4a066ec8671d1cbab7cff304f9926f6b4b2a754 100644 --- a/interfaces/innerkits/netshareclient/BUILD.gn +++ b/interfaces/innerkits/netshareclient/BUILD.gn @@ -91,6 +91,7 @@ ohos_static_library("netshare_service_interface_stub") { cfi_cross_dso = true debug = false } + branch_protector_ret = "pac_ret" public_configs = [ ":netshare_service_interface_stub_config" ] output_values = get_target_outputs(":netshare_service_interface") sources = [] @@ -121,9 +122,6 @@ ohos_shared_library("net_tether_manager_if") { sources = [ "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/networkshare_client.cpp", - "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_proxy.cpp", - "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/netshare_result_callback_stub.cpp", - "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_proxy.cpp", "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_stub.cpp", ] diff --git a/interfaces/innerkits/netshareclient/include/networkshare_client.h b/interfaces/innerkits/netshareclient/include/networkshare_client.h index 7c23d1ffca984647f3eb0022eadd3c683b2dfcd5..902a5c068567d7ac3a6afc62daeab1ebf27a9f8c 100644 --- a/interfaces/innerkits/netshareclient/include/networkshare_client.h +++ b/interfaces/innerkits/netshareclient/include/networkshare_client.h @@ -18,7 +18,6 @@ #include -#include "i_netshare_result_callback.h" #include "inetwork_share_service.h" #include "isharing_event_callback.h" #include "parcel.h" diff --git a/interfaces/innerkits/netshareclient/include/proxy/ipccallback/i_netshare_result_callback.h b/interfaces/innerkits/netshareclient/include/proxy/ipccallback/i_netshare_result_callback.h deleted file mode 100644 index 1d5a3c6f36536f13cf4e5f65b47acdb3afce3f43..0000000000000000000000000000000000000000 --- a/interfaces/innerkits/netshareclient/include/proxy/ipccallback/i_netshare_result_callback.h +++ /dev/null @@ -1,34 +0,0 @@ -/* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef I_NETSHARE_RESULT_CALLBACK_H -#define I_NETSHARE_RESULT_CALLBACK_H - -#include -#include - -#include "tethering_ipc_interface_code.h" - -namespace OHOS { -namespace NetManagerStandard { -class INetShareResultCallback : public IRemoteBroker { -public: - virtual void OnResult(const int32_t &status) = 0; - - DECLARE_INTERFACE_DESCRIPTOR(u"OHOS.NetManagerStandard.INetworkShareService.INetShareResultCallback"); -}; -} // namespace NetManagerStandard -} // namespace OHOS -#endif // I_NETSHARE_RESULT_CALLBACK_H diff --git a/interfaces/innerkits/netshareclient/include/proxy/ipccallback/netshare_result_callback_proxy.h b/interfaces/innerkits/netshareclient/include/proxy/ipccallback/netshare_result_callback_proxy.h deleted file mode 100644 index 58beb373523155b3f84dcf16337e2779b86bcba3..0000000000000000000000000000000000000000 --- a/interfaces/innerkits/netshareclient/include/proxy/ipccallback/netshare_result_callback_proxy.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022-2023 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef NETSHARE_RESULT_CALLBACK_PROXY_H -#define NETSHARE_RESULT_CALLBACK_PROXY_H - -#include - -#include "i_netshare_result_callback.h" -#include "iremote_proxy.h" - -namespace OHOS { -namespace NetManagerStandard { -class NetShareResultCallbackProxy : public IRemoteProxy { -public: - explicit NetShareResultCallbackProxy(const sptr &object); - virtual ~NetShareResultCallbackProxy() = default; - virtual void OnResult(const int32_t &result) override; - -private: - static inline BrokerDelegator delegator_; -}; -} // namespace NetManagerStandard -} // namespace OHOS - -#endif // NETSHARE_RESULT_CALLBACK_PROXY_H diff --git a/interfaces/innerkits/netshareclient/include/proxy/ipccallback/netshare_result_callback_stub.h b/interfaces/innerkits/netshareclient/include/proxy/ipccallback/netshare_result_callback_stub.h deleted file mode 100644 index 85300e7b3a5a54b2493b58a2c26bf2f99ea28455..0000000000000000000000000000000000000000 --- a/interfaces/innerkits/netshareclient/include/proxy/ipccallback/netshare_result_callback_stub.h +++ /dev/null @@ -1,38 +0,0 @@ -/* - * Copyright (c) 2022 Huawei Device Co., Ltd. - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - */ - -#ifndef NETSHARE_RESULT_CALLBACK_STUB_H -#define NETSHARE_RESULT_CALLBACK_STUB_H - -#include - -#include "i_netshare_result_callback.h" -#include "iremote_stub.h" - -namespace OHOS { -namespace NetManagerStandard { -class NetShareResultCallbackStub : public IRemoteStub { -public: - NetShareResultCallbackStub() = default; - virtual ~NetShareResultCallbackStub() = default; - - int32_t OnRemoteRequest(uint32_t code, MessageParcel &data, MessageParcel &reply, MessageOption &option) override; - -private: - DISALLOW_COPY_AND_MOVE(NetShareResultCallbackStub); -}; -} // namespace NetManagerStandard -} // namespace OHOS -#endif // NETSHARE_RESULT_CALLBACK_STUB_H diff --git a/interfaces/innerkits/netshareclient/include/proxy/tethering_ipc_interface_code.h b/interfaces/innerkits/netshareclient/include/proxy/tethering_ipc_interface_code.h index 30fc2c7149d5fec7ef3b0b414f10014cc83ea581..51d12a780f05fbbfcbb737344eea9474ea85f951 100644 --- a/interfaces/innerkits/netshareclient/include/proxy/tethering_ipc_interface_code.h +++ b/interfaces/innerkits/netshareclient/include/proxy/tethering_ipc_interface_code.h @@ -41,10 +41,6 @@ enum class TetheringEventInterfaceCode { INTERFACE_SHARING_STATE_CHANGED, SHARING_UPSTREAM_CHANGED, }; - -enum class TetheringResultInterfaceCode { - RESULT, -}; } // namespace NetManagerStandard } // namespace OHOS #endif // TETHERING_IPC_INTERFACE_CODE_H diff --git a/interfaces/innerkits/netshareclient/libnetshare_kits.map b/interfaces/innerkits/netshareclient/libnetshare_kits.map index cf2b9c1e7d6dd7622ed174554ad949a2bf4d68ef..b9e6fcc6ceabaa41c1a523ef4ebc27bb9dc16fd4 100644 --- a/interfaces/innerkits/netshareclient/libnetshare_kits.map +++ b/interfaces/innerkits/netshareclient/libnetshare_kits.map @@ -30,8 +30,6 @@ "OHOS::NetManagerStandard::NetworkShareClient::~NetworkShareClient()"; "OHOS::NetManagerStandard::NetworkShareClient::RegisterSharingEvent(OHOS::sptr)"; "OHOS::NetManagerStandard::NetworkShareClient::UnregisterSharingEvent(OHOS::sptr)"; - "OHOS::NetManagerStandard::NetShareResultCallbackProxy::NetShareResultCallbackProxy(OHOS::sptr const&)"; - "OHOS::NetManagerStandard::NetShareResultCallbackStub::OnRemoteRequest(unsigned int, OHOS::MessageParcel&, OHOS::MessageParcel&, OHOS::MessageOption&)"; "OHOS::NetManagerStandard::NetworkShareLoadCallback::GetRemoteObject() const"; VTT?for?OHOS::NetManagerStandard::NetworkShareLoadCallback; vtable?for?OHOS::NetManagerStandard::NetworkShareLoadCallback; diff --git a/interfaces/innerkits/netvpnclient/BUILD.gn b/interfaces/innerkits/netvpnclient/BUILD.gn index c1d3b1d2bffe2966aa11d782a304cfc590fe651c..b541da2422399d1ae4be56b73f2c306d7a2bf90e 100644 --- a/interfaces/innerkits/netvpnclient/BUILD.gn +++ b/interfaces/innerkits/netvpnclient/BUILD.gn @@ -102,7 +102,7 @@ config("networkvpn_interface_stub_config") { } } -ohos_source_set("networkvpn_interface_stub") { +ohos_static_library("networkvpn_interface_stub") { sanitize = { cfi = true cfi_cross_dso = true diff --git a/interfaces/innerkits/networksliceclient/BUILD.gn b/interfaces/innerkits/networksliceclient/BUILD.gn index 4a2a65f20144d8bce9d79a251766df444884e8a5..f10a50aabde6b3f86305b9c1ac67daaf6c69d363 100644 --- a/interfaces/innerkits/networksliceclient/BUILD.gn +++ b/interfaces/innerkits/networksliceclient/BUILD.gn @@ -71,6 +71,8 @@ ohos_shared_library("networkslice_manager_if") { debug = false } + branch_protector_ret = "pac_ret" + sources = [ "$NETWORKSLICE_INNERKITS_SOURCE_DIR/src/networkslice_client.cpp", "$NETWORKSLICE_INNERKITS_SOURCE_DIR/src/networkslice_proxy.cpp", diff --git a/netmanager_ext_config.gni b/netmanager_ext_config.gni index 7bea9eb6cc2673ce82a93c42ce66b103c1ac21a3..ca7f588026fc2b11c530c5c7d4a2faaeb2d03c7f 100644 --- a/netmanager_ext_config.gni +++ b/netmanager_ext_config.gni @@ -79,7 +79,6 @@ declare_args() { sysvpn_flags = [ "-DSUPPORT_SYSVPN" ] common_cflags = [ - "-fstack-protector-strong", "-D_FORTIFY_SOURCE=2", "-fdata-sections", "-ffunction-sections", diff --git a/services/ethernetmanager/BUILD.gn b/services/ethernetmanager/BUILD.gn index 246a757dc2ed37219bfa9978bf5fd41eb00a2404..428838f5a46fae468ec62b0f1be44fdb6c0bc687 100644 --- a/services/ethernetmanager/BUILD.gn +++ b/services/ethernetmanager/BUILD.gn @@ -25,7 +25,6 @@ ohos_shared_library("ethernet_manager") { sources = [ "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/interface_state_callback_proxy.cpp", - "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/interface_state_callback_stub.cpp", "src/dev_interface_state.cpp", "src/ethernet_configuration.cpp", "src/ethernet_dhcp_controller.cpp", @@ -45,8 +44,87 @@ ohos_shared_library("ethernet_manager") { "$EXT_INNERKITS_ROOT/ethernetclient/include/proxy", ] - cflags = common_cflags + cflags = common_cflags + memory_optimization_cflags + + cflags_cc = common_cflags + memory_optimization_cflags_cc + + ldflags = memory_optimization_ldflags + + deps = [ "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_parcel" ] + deps += [ "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_service_interface_stub" ] + + external_deps = [ + "bounds_checking_function:libsec_shared", + "cJSON:cjson", + "dhcp:dhcp_sdk", + "eventhandler:libeventhandler", + "ffrt:libffrt", + "init:libbegetutil", + "ipc:ipc_core", + "netmanager_base:net_conn_manager_if", + "netmanager_base:net_manager_common", + "netmanager_base:net_native_manager_if", + "netmanager_base:net_service_common", + "netmanager_base:net_stats_manager_if", + "netmanager_base:netsys_controller", + "safwk:system_ability_fwk", + "samgr:samgr_proxy", + ] + + defines = [ + "NETMGR_LOG_TAG = \"EthernetManager\"", + "LOG_DOMAIN = 0xD0015B0", + "USER_CONFIG_DIR = \"/data/service/el1/public/netmanager/ethernet\"", + "NETWORK_CONFIG_PATH = \"/system/etc/communication/netmanager_ext/ethernet_interfaces.json\"", + ] + + if (netmanager_ext_extensible_authentication) { + defines += [ "NET_EXTENSIBLE_AUTHENTICATION" ] + external_deps += [ + "drivers_interface_ethernet:libethernet_proxy_1.0", + "hdf_core:libhdf_ipc_adapter", + "hdf_core:libhdi", + ] + sources += [ + "src/eap_hdi_wpa_manager.cpp" + ] + } + + if (enable_netmgr_ext_debug) { + defines += [ "NETMGR_DEBUG" ] + } + + external_deps += [ "hilog:libhilog" ] + + part_name = "netmanager_ext" + subsystem_name = "communication" +} + +ohos_static_library("ethernet_manager_static") { + testonly = true + branch_protector_ret = "pac_ret" + sources = [ + "$ETHERNETMANAGER_INNERKITS_SOURCE_DIR/src/proxy/interface_state_callback_proxy.cpp", + "src/dev_interface_state.cpp", + "src/ethernet_configuration.cpp", + "src/ethernet_dhcp_controller.cpp", + "src/ethernet_lan_management.cpp", + "src/ethernet_management.cpp", + "src/ethernet_service.cpp", + "src/ethernet_service_common.cpp", + "src/net_eap_callback_proxy.cpp", + "src/net_eap_handler.cpp", + ] + include_dirs = [ + "include", + "include/stub", + "$EXT_INNERKITS_ROOT/include", + "$EXT_INNERKITS_ROOT/ethernetclient/include", + "$EXT_INNERKITS_ROOT/ethernetclient/include/proxy", + ] + + cflags = common_cflags cflags_cc = common_cflags deps = [ "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_parcel" ] diff --git a/services/netfirewallmanager/BUILD.gn b/services/netfirewallmanager/BUILD.gn index 117f920a18c0fd45ca90fa4db073a36694d478ae..df2e920ab3323de6746fdeb5421e9e584367c19e 100755 --- a/services/netfirewallmanager/BUILD.gn +++ b/services/netfirewallmanager/BUILD.gn @@ -81,6 +81,8 @@ ohos_shared_library("netfirewall_manager") { debug = false } + branch_protector_ret = "pac_ret" + configs = [ ":netfirewall_manager_config", "$NETMANAGER_EXT_ROOT/resource:coverage_flags", @@ -109,6 +111,8 @@ ohos_static_library("netfirewall_manager_static") { debug = false } + branch_protector_ret = "pac_ret" + configs = [ ":netfirewall_manager_config", "$NETMANAGER_EXT_ROOT/resource:coverage_flags", diff --git a/services/networksharemanager/BUILD.gn b/services/networksharemanager/BUILD.gn index 273977b2c73a06baedb257048d1ab3efbb431d5f..f1f225f350195b604570157fde63895d754b2e91 100644 --- a/services/networksharemanager/BUILD.gn +++ b/services/networksharemanager/BUILD.gn @@ -39,7 +39,6 @@ ohos_shared_library("net_tether_manager") { sources = [ "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_proxy.cpp", - "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_stub.cpp", "$NETWORKSHAREMANAGER_SOURCE_DIR/src/networkshare_configuration.cpp", "$NETWORKSHAREMANAGER_SOURCE_DIR/src/networkshare_hisysevent.cpp", "$NETWORKSHAREMANAGER_SOURCE_DIR/src/networkshare_main_statemachine.cpp", @@ -164,7 +163,6 @@ ohos_static_library("net_tether_manager_static") { sources = [ "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_proxy.cpp", - "$NETWORKSHAREMANAGER_INNERKITS_SOURCE_DIR/src/proxy/ipccallback/sharing_event_callback_stub.cpp", "$NETWORKSHAREMANAGER_SOURCE_DIR/src/networkshare_configuration.cpp", "$NETWORKSHAREMANAGER_SOURCE_DIR/src/networkshare_hisysevent.cpp", "$NETWORKSHAREMANAGER_SOURCE_DIR/src/networkshare_main_statemachine.cpp", diff --git a/services/networksharemanager/include/networkshare_tracker.h b/services/networksharemanager/include/networkshare_tracker.h index 828a40822a233194628cca0b3b4459c6d9b9a547..f1102652080463d08882521872f17043256d3cc2 100644 --- a/services/networksharemanager/include/networkshare_tracker.h +++ b/services/networksharemanager/include/networkshare_tracker.h @@ -25,7 +25,6 @@ #include "bluetooth_remote_device.h" #endif #include "event_handler.h" -#include "i_netshare_result_callback.h" #include "isharing_event_callback.h" #ifdef WIFI_MODOULE #include "i_wifi_hotspot_callback.h" diff --git a/test/ethernetmanager/fuzztest/ethernetclient_fuzzer/BUILD.gn b/test/ethernetmanager/fuzztest/ethernetclient_fuzzer/BUILD.gn index 63a5ea42a30f77ce859d316a54da8cb83729d2a9..80f4b505e174114f33ae110dcbe984d7b0760e0e 100644 --- a/test/ethernetmanager/fuzztest/ethernetclient_fuzzer/BUILD.gn +++ b/test/ethernetmanager/fuzztest/ethernetclient_fuzzer/BUILD.gn @@ -56,7 +56,7 @@ ohos_fuzztest("EthernetClientFuzzTest") { ] deps = [ - "$ETHERNETMANAGER_SOURCE_DIR:ethernet_manager", + "$ETHERNETMANAGER_SOURCE_DIR:ethernet_manager_static", "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_manager_if", ] diff --git a/test/ethernetmanager/unittest/ethernet_manager_test/BUILD.gn b/test/ethernetmanager/unittest/ethernet_manager_test/BUILD.gn index 4afd6c19060967565dec89293ac978132eac726d..3221f250d90a76fbfe3722549958d3ebd4694ae0 100644 --- a/test/ethernetmanager/unittest/ethernet_manager_test/BUILD.gn +++ b/test/ethernetmanager/unittest/ethernet_manager_test/BUILD.gn @@ -55,7 +55,7 @@ ohos_unittest("ethernet_manager_test") { ] deps = [ - "$ETHERNETMANAGER_SOURCE_DIR:ethernet_manager", + "$ETHERNETMANAGER_SOURCE_DIR:ethernet_manager_static", "$EXT_INNERKITS_ROOT/ethernetclient:ethernet_manager_if", ] diff --git a/test/networksharemanager/unittest/networkshare_manager_test/BUILD.gn b/test/networksharemanager/unittest/networkshare_manager_test/BUILD.gn index fa831104bfe869f89492ba6187c202cbbec2d169..105ca5c19bf8d1337c94ae50b495b75e497abbf6 100644 --- a/test/networksharemanager/unittest/networkshare_manager_test/BUILD.gn +++ b/test/networksharemanager/unittest/networkshare_manager_test/BUILD.gn @@ -33,8 +33,6 @@ ohos_unittest("networkshare_manager_test") { "edm_parameter_utils_test.cpp", "interface_configuration_test.cpp", "net_event_report_test.cpp", - "netshare_result_callback_proxy_test.cpp", - "netshare_result_callback_stub_test.cpp", "networkshare_hisysevent_test.cpp", "networkshare_main_statemachine_test.cpp", "networkshare_manager_test.cpp", diff --git a/test/networksharemanager/unittest/networkshare_manager_test/networkshare_manager_test.cpp b/test/networksharemanager/unittest/networkshare_manager_test/networkshare_manager_test.cpp index 4a0f6a6e00cca5a5bfd9624168274d1fe9fa4f52..18e3f3c249020045f504a500d64a880a55ffd2f6 100644 --- a/test/networksharemanager/unittest/networkshare_manager_test/networkshare_manager_test.cpp +++ b/test/networksharemanager/unittest/networkshare_manager_test/networkshare_manager_test.cpp @@ -23,7 +23,6 @@ #include "net_manager_constants.h" #include "netmanager_ext_test_security.h" #include "netmgr_ext_log_wrapper.h" -#include "netshare_result_callback_stub.h" #define private public #include "networkshare_client.h" #undef private