1. remove unnecessary log code during the permission check. 2. fix memory leak and fp leak. 3. fix multiple etmemd and too many err log problem. Signed-off-by: liubo <liubo254@huawei.com> (cherry picked from commit 7c109accd61df6d6b12b4aff89445acecd3ee555)
35 lines
1.0 KiB
Diff
35 lines
1.0 KiB
Diff
From 3ac65b4eb27e0e5d940e898af98de87e49e1fe99 Mon Sep 17 00:00:00 2001
|
|
From: liubo <liubo254@huawei.com>
|
|
Date: Mon, 10 Apr 2023 21:12:25 +0800
|
|
Subject: [PATCH 2/4] etmem: remove unnecessary log code
|
|
|
|
etmem supports only 400/600 configuration file
|
|
permissions.
|
|
|
|
During the permission check, the system check whether
|
|
the permisson requirements of 400 or 600 are met.
|
|
|
|
Error logs do not need to be printed during each permission
|
|
check.
|
|
|
|
Signed-off-by: liubo <liubo254@huawei.com>
|
|
---
|
|
etmem/src/etmemd_src/etmemd_common.c | 1 -
|
|
1 file changed, 1 deletion(-)
|
|
|
|
diff --git a/etmem/src/etmemd_src/etmemd_common.c b/etmem/src/etmemd_src/etmemd_common.c
|
|
index 649f472..7a6125e 100644
|
|
--- a/etmem/src/etmemd_src/etmemd_common.c
|
|
+++ b/etmem/src/etmemd_src/etmemd_common.c
|
|
@@ -563,7 +563,6 @@ int file_permission_check(const char *file_path, mode_t mode)
|
|
|
|
file_p = buf.st_mode & S_IRWX_VALID;
|
|
if (file_p != mode) {
|
|
- etmemd_log(ETMEMD_LOG_WARN, "file : %s mode is wrong.\n", file_path);
|
|
return -1;
|
|
}
|
|
|
|
--
|
|
2.33.0
|
|
|