From b4afaf867dac7408258318c9549d3c561ae37449 Mon Sep 17 00:00:00 2001
From: zhongtao <zhongtao17@huawei.com>
Date: Tue, 21 Nov 2023 01:33:29 +0000
Subject: [PATCH 154/181] !2257 disable grpc remote connect by default *
 disable grpc remote connect by default

---
 cmake/options.cmake                         | 2 +-
 test/cutils/utils_verify/utils_verify_ut.cc | 2 ++
 2 files changed, 3 insertions(+), 1 deletion(-)

diff --git a/cmake/options.cmake b/cmake/options.cmake
index 125cabb5..bad12ea3 100644
--- a/cmake/options.cmake
+++ b/cmake/options.cmake
@@ -90,7 +90,7 @@ if (ENABLE_SELINUX STREQUAL "ON")
     message("${Green}--  Enable selinux${ColourReset}")
 endif()
 
-option(ENABLE_GRPC_REMOTE_CONNECT "enable gRPC remote connect" ON)
+option(ENABLE_GRPC_REMOTE_CONNECT "enable gRPC remote connect" OFF)
 if (ENABLE_GRPC_REMOTE_CONNECT STREQUAL "ON")
 	add_definitions(-DENABLE_GRPC_REMOTE_CONNECT=1)
 	set(ENABLE_GRPC_REMOTE_CONNECT 1)
diff --git a/test/cutils/utils_verify/utils_verify_ut.cc b/test/cutils/utils_verify/utils_verify_ut.cc
index a68dfb66..b57b906d 100644
--- a/test/cutils/utils_verify/utils_verify_ut.cc
+++ b/test/cutils/utils_verify/utils_verify_ut.cc
@@ -70,12 +70,14 @@ TEST(utils_verify, test_util_validate_socket)
     ASSERT_EQ(util_validate_socket("unix://./isulad"), false);
     ASSERT_EQ(util_validate_socket("unix://isulad"), false);
 
+#ifdef ENABLE_GRPC_REMOTE_CONNECT
     ASSERT_EQ(util_validate_socket("tcp://localhost:2375"), true);
     ASSERT_EQ(util_validate_socket("tcp://127.0.0.1:2375"), true);
 
     ASSERT_EQ(util_validate_socket("tcp://"), false);
     ASSERT_EQ(util_validate_socket("tcp://127.0.0.1"), false);
     ASSERT_EQ(util_validate_socket("tcp://127.0.0.1,2375"), false);
+#endif
 }
 
 TEST(utils_verify, test_util_valid_device_mode)
-- 
2.42.0

