From 4867a04a1b7d61beb8aeb63749ea008ab8d12ee9 Mon Sep 17 00:00:00 2001 From: gaohuatao Date: Thu, 12 Nov 2020 16:54:50 +0800 Subject: [PATCH] update from openeuler master Signed-off-by: gaohuatao (cherry picked from commit b8dbb06f9842316881ef31bbc99ff7134472cfaf) Signed-off-by: gaohuatao --- 0001-ignore-proxy-envs.patch | 41 ++++++++++++++++++++++++++++++++++++ clibcni.spec | 11 ++++++++-- 2 files changed, 50 insertions(+), 2 deletions(-) create mode 100644 0001-ignore-proxy-envs.patch diff --git a/0001-ignore-proxy-envs.patch b/0001-ignore-proxy-envs.patch new file mode 100644 index 0000000..d33c0cc --- /dev/null +++ b/0001-ignore-proxy-envs.patch @@ -0,0 +1,41 @@ +From 6af19b52f4867cfb722425ab702162af0f81d0ab Mon Sep 17 00:00:00 2001 +From: haozi007 +Date: Fri, 4 Sep 2020 09:53:37 +0800 +Subject: [PATCH] ignore proxy envs + +do not inherit proxy envs from isulad + +Signed-off-by: haozi007 +--- + src/invoke/args.c | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/src/invoke/args.c b/src/invoke/args.c +index 96f0b81..f95d444 100644 +--- a/src/invoke/args.c ++++ b/src/invoke/args.c +@@ -156,6 +156,9 @@ free_out: + + char **as_env(const struct cni_args *cniargs) + { ++#define NO_PROXY_KEY "no_proxy" ++#define HTTP_PROXY_KEY "http_proxy" ++#define HTTPS_PROXY_KEY "https_proxy" + char **result = NULL; + char **pos = NULL; + size_t len = 0; +@@ -188,6 +191,11 @@ char **as_env(const struct cni_args *cniargs) + + /* inherit environs of parent */ + for (pos = envir; pos != NULL && *pos != NULL && i < len; pos++) { ++ // ignore proxy environs ++ if (strcasecmp(*pos, NO_PROXY_KEY) == 0 || strcasecmp(*pos, HTTP_PROXY_KEY) == 0 || ++ strcasecmp(*pos, HTTPS_PROXY_KEY) == 0) { ++ continue; ++ } + result[i] = clibcni_util_strdup_s(*pos); + i++; + } +-- +2.20.1 + diff --git a/clibcni.spec b/clibcni.spec index a27d10a..3583506 100644 --- a/clibcni.spec +++ b/clibcni.spec @@ -1,5 +1,5 @@ %global _version 2.0.3 -%global _release 20200904.104745.git413e6757 +%global _release 20201112.165252.gitc4aadda4 Name: clibcni Version: %{_version} Release: %{_release} @@ -10,6 +10,8 @@ URL: https://gitee.com/openeuler/clibcni Source0: https://gitee.com/openeuler/clibcni/repository/archive/v%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version} +Patch9001: 0001-ignore-proxy-envs.patch + BuildRequires: gcc BuildRequires: cmake BuildRequires: lcr-devel yajl-devel @@ -84,8 +86,13 @@ rm -rf %{buildroot} %{_includedir}/%{name}/*.h %{_libdir}/pkgconfig/%{name}.pc - %changelog +* Thu Nov 12 2020 gaohuatao - 2.0.3-20201112.165252.gitc4aadda4 +- Type:enhancement +- ID:NA +- SUG:NA +- DESC: update from openeuler master + * Fri Sep 04 2020 zhangxiaoyu - 2.0.3-20200904.104745.git413e6757 - Type:enhancement - ID:NA