summaryrefslogtreecommitdiff
path: root/0102-fix-false-engine-rootpath-reference.patch
blob: a375a4423832a6a9c8143558f0d3c6a881318a63 (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
27
28
29
30
31
32
From fa25a8923e47ed6b65e0bcd08954589f5b26092c Mon Sep 17 00:00:00 2001
From: jikai <jikai11@huawei.com>
Date: Wed, 5 Jun 2024 02:10:48 +0000
Subject: [PATCH 102/108] fix false engine rootpath reference

Signed-off-by: jikai <jikai11@huawei.com>
---
 src/daemon/config/isulad_config.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/daemon/config/isulad_config.c b/src/daemon/config/isulad_config.c
index 80689bce..d7b54498 100644
--- a/src/daemon/config/isulad_config.c
+++ b/src/daemon/config/isulad_config.c
@@ -398,12 +398,12 @@ char *conf_get_sandbox_rootpath(void)
         ERROR("Get rootpath failed");
         return epath;
     }
-    if (strlen(rootpath) > (PATH_MAX - strlen(ENGINE_ROOTPATH_NAME)) - 2) {
+    if (strlen(rootpath) > (PATH_MAX - strlen(SANDBOX_ROOTPATH_NAME)) - 2) {
         ERROR("Root path is too long");
         return epath;
     }
     // rootpath + "/" + SANDBOX_ROOTPATH_NAME + "/0"
-    len = strlen(rootpath) + 1 + strlen(ENGINE_ROOTPATH_NAME) + 1;
+    len = strlen(rootpath) + 1 + strlen(SANDBOX_ROOTPATH_NAME) + 1;
     epath = util_smart_calloc_s(sizeof(char), len);
     if (epath == NULL) {
         ERROR("Out of memory");
-- 
2.25.1