增加安全编译选项

Signed-off-by: woohoa <wanghuan36@huawei.com>
This commit is contained in:
15950533375 2024-10-11 14:05:45 +08:00
parent 803fc3be8b
commit 99e94a43a7
8 changed files with 17 additions and 1 deletions

View File

@ -28,6 +28,8 @@ config("app_domain_verify_frameworks_common_config") {
cflags = [
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]

View File

@ -26,6 +26,8 @@ config("app_domain_verify_extension_config") {
cflags = [
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]

View File

@ -30,6 +30,8 @@ config("app_domain_verify_agent_verifier_config") {
cflags = [
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]

View File

@ -28,6 +28,8 @@ config("app_domain_verify_mgr_client_config") {
cflags = [
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]

View File

@ -25,6 +25,8 @@ config("app_domain_verify_common_config") {
cflags = [
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]

View File

@ -27,6 +27,8 @@ config("app_domain_verify_mgr_napi_config") {
"-fvisibility=hidden",
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]

View File

@ -37,6 +37,8 @@ config("app_domain_verify_service_config") {
"-fvisibility=hidden",
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]
@ -125,6 +127,8 @@ config("app_domain_verify_agent_service_config") {
"-fvisibility=hidden",
"-fdata-sections",
"-ffunction-sections",
"-fstack-protector-strong",
"-D_FORTIFY_SOURCE=2",
"-Os",
]

View File

@ -63,7 +63,7 @@ void AppDomainVerifyMgrService::VerifyDomain(const std::string& appIdentifier, c
bool AppDomainVerifyMgrService::ClearDomainVerifyStatus(const std::string& appIdentifier, const std::string& bundleName)
{
APP_DOMAIN_VERIFY_HILOGI(APP_DOMAIN_VERIFY_MGR_MODULE_SERVICE, "called");
APP_DOMAIN_VERIFY_HILOGI(APP_DOMAIN_VERIFY_MGR_MODULE_SERVICE, "called, bundlename:%{public}s", bundleName.c_str());
if (!PermissionManager::IsSACall()) {
APP_DOMAIN_VERIFY_HILOGE(APP_DOMAIN_VERIFY_MGR_MODULE_SERVICE, "only sa can call");
return false;