From 6a97a852bbf8b8718b1e8a0fb29f003cad55ca09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=9F=B3=E4=BD=B3=E7=82=9C?= Date: Thu, 28 Aug 2025 17:45:10 +0800 Subject: [PATCH] safe code MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 石佳炜 --- utils/src/b_hiaudit/hi_audit.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/utils/src/b_hiaudit/hi_audit.cpp b/utils/src/b_hiaudit/hi_audit.cpp index 8367eab47..993468555 100644 --- a/utils/src/b_hiaudit/hi_audit.cpp +++ b/utils/src/b_hiaudit/hi_audit.cpp @@ -74,7 +74,7 @@ void HiAudit::Init() } std::string logFilePath = hiAuditConfig_.logPath + hiAuditConfig_.logName + "_audit.csv"; writeFd_ = - open(logFilePath.c_str(), O_CREAT | O_APPEND | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); + open(logFilePath.c_str(), O_CREAT | O_APPEND | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (writeFd_ < 0) { HILOGE("Init, open error, logFilePath is:%{public}s, errno:%{public}d", logFilePath.c_str(), errno); } @@ -143,7 +143,7 @@ void HiAudit::GetWriteFilePath() } std::string logFilePath = hiAuditConfig_.logPath + hiAuditConfig_.logName + "_audit.csv"; writeFd_ = - open(logFilePath.c_str(), O_CREAT | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP | S_IROTH); + open(logFilePath.c_str(), O_CREAT | O_TRUNC | O_RDWR, S_IRUSR | S_IWUSR | S_IRGRP | S_IROTH); if (writeFd_ < 0) { HILOGE("GetWriteFilePath, Open fd error, errno:%{public}d", errno); } -- Gitee