代码拉取完成,页面将自动刷新
同步操作将从 src-openEuler/gazelle 强制同步,此操作会覆盖自 Fork 仓库以来所做的任何修改,且无法恢复!!!
确定后同步将在后台操作,完成时将刷新页面,请耐心等待。
From b3b492c64bab47d4bb898422fb9a57a2536e0d61 Mon Sep 17 00:00:00 2001
From: jiangheng12 <jiangheng14@huawei.com>
Date: Wed, 26 Apr 2023 20:06:42 +0800
Subject: [PATCH] dfx: security function failed, return error directly
---
src/ltran/ltran_dfx.c | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/src/ltran/ltran_dfx.c b/src/ltran/ltran_dfx.c
index 4baca26..944675e 100644
--- a/src/ltran/ltran_dfx.c
+++ b/src/ltran/ltran_dfx.c
@@ -206,12 +206,14 @@ static int32_t dfx_connect_ltran(bool use_ltran, bool probe)
ret = memset_s(&addr, sizeof(addr), 0, sizeof(struct sockaddr_un));
if (ret != EOK) {
printf("%s:%d memset_s fail ret=%d\n", __FUNCTION__, __LINE__, ret);
+ goto END;
}
ret = strncpy_s(addr.sun_path, sizeof(addr.sun_path), GAZELLE_RUN_DIR,
strlen(GAZELLE_RUN_DIR) + 1);
if (ret != EOK) {
printf("%s:%d strncpy_s fail ret=%d\n", __FUNCTION__, __LINE__, ret);
+ goto END;
}
if (g_unix_prefix) {
@@ -219,6 +221,7 @@ static int32_t dfx_connect_ltran(bool use_ltran, bool probe)
strlen(g_unix_prefix) + 1);
if (ret != EOK) {
printf("%s:%d strncat_s fail ret=%d\n", __FUNCTION__, __LINE__, ret);
+ goto END;
}
}
@@ -234,6 +237,7 @@ static int32_t dfx_connect_ltran(bool use_ltran, bool probe)
strlen(GAZELLE_REG_SOCK_FILENAME) + 1);
if (ret != EOK) {
printf("%s:%d strncat_s fail ret=%d\n", __FUNCTION__, __LINE__, ret);
+ goto END;
}
}
@@ -243,11 +247,13 @@ static int32_t dfx_connect_ltran(bool use_ltran, bool probe)
printf("connect ltran failed. errno: %d ret=%d\n", errno, ret);
printf("You may need to use the -u parameter to specify the UNIX_PREFIX that matches the configuration.\n");
}
- close(fd);
- return GAZELLE_ERR;
+ goto END;
}
return fd;
+END:
+ close(fd);
+ return GAZELLE_ERR;
}
static int32_t dfx_stat_conn_to_ltran(struct gazelle_stat_msg_request *req_msg)
--
2.33.0
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。