blob: 6ac44230655729c02321db74bc04a26f5fdbe2d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
From 60a2b15e0090018b7850b37369964bf62e253419 Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Wed, 5 Jun 2024 02:07:23 +0000
Subject: [PATCH 101/108] use isula_clean_path rather than realpath
Signed-off-by: jikai <jikai11@huawei.com>
---
src/cmd/isulad-shim/process.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cmd/isulad-shim/process.c b/src/cmd/isulad-shim/process.c
index 18fae03f..dd41c77f 100644
--- a/src/cmd/isulad-shim/process.c
+++ b/src/cmd/isulad-shim/process.c
@@ -489,7 +489,7 @@ static bool attach_fifopath_security_check(process_t *p, const char *fifopath)
return false;
}
- if (realpath(fifopath, real_path) == NULL) {
+ if (isula_clean_path(fifopath, real_path, sizeof(real_path)) == NULL) {
ERROR("Failed to get realpath for '%s': %d.", real_path, SHIM_SYS_ERR(errno));
return false;
}
--
2.25.1
|