iSulad/0183-check-if-shim-log.json-is-a-symlink.patch
openeuler-sync-bot 75b3c2d391 !662 [sync] PR-659: upgrade from upstream
* upgrade from upstream
2024-02-05 01:34:02 +00:00

27 lines
848 B
Diff

From c8d940c54bd1183ffbe918f75af063a90e8677d4 Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Sun, 24 Dec 2023 14:04:19 +0800
Subject: [PATCH 183/198] check if shim-log.json is a symlink
Signed-off-by: jikai <jikai11@huawei.com>
---
src/cmd/isulad-shim/common.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cmd/isulad-shim/common.c b/src/cmd/isulad-shim/common.c
index 4a84cf40..2c0a4e3a 100644
--- a/src/cmd/isulad-shim/common.c
+++ b/src/cmd/isulad-shim/common.c
@@ -33,7 +33,7 @@ int g_log_fd = -1;
int init_shim_log(void)
{
- g_log_fd = open_no_inherit(SHIM_LOG_NAME, O_CREAT | O_WRONLY | O_APPEND | O_SYNC, 0640);
+ g_log_fd = open_no_inherit(SHIM_LOG_NAME, O_CREAT | O_WRONLY | O_APPEND | O_SYNC | O_NOFOLLOW, 0640);
if (g_log_fd < 0) {
return SHIM_ERR;
}
--
2.25.1