summaryrefslogtreecommitdiff
path: root/0101-use-isula_clean_path-rather-than-realpath.patch
diff options
context:
space:
mode:
authorCoprDistGit <infra@openeuler.org>2024-09-03 03:24:28 +0000
committerCoprDistGit <infra@openeuler.org>2024-09-03 03:24:28 +0000
commite45819fcb4a96649a4030db7684f140d5ca46735 (patch)
tree544dac3e30a0448eabdc50add41aa3a18982d9f1 /0101-use-isula_clean_path-rather-than-realpath.patch
parent1a71e3afebb4b43be63949dcc8e882fe7643f13b (diff)
automatic import of iSuladopeneuler24.03_LTS
Diffstat (limited to '0101-use-isula_clean_path-rather-than-realpath.patch')
-rw-r--r--0101-use-isula_clean_path-rather-than-realpath.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/0101-use-isula_clean_path-rather-than-realpath.patch b/0101-use-isula_clean_path-rather-than-realpath.patch
new file mode 100644
index 0000000..6ac4423
--- /dev/null
+++ b/0101-use-isula_clean_path-rather-than-realpath.patch
@@ -0,0 +1,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
+