diff --git a/patch/0141-runc-libct-init-unify-init-fix-its-error-logic.patch b/patch/0141-runc-libct-init-unify-init-fix-its-error-logic.patch index 90788cf..37ffe1c 100644 --- a/patch/0141-runc-libct-init-unify-init-fix-its-error-logic.patch +++ b/patch/0141-runc-libct-init-unify-init-fix-its-error-logic.patch @@ -1,4 +1,4 @@ -From a6670de912095206f356b8b7b486d237d1012c88 Mon Sep 17 00:00:00 2001 +From 3067c7503547e7c1f2499a69b1713051515743e0 Mon Sep 17 00:00:00 2001 From: Kir Kolyshkin Date: Wed, 9 Aug 2023 12:04:26 +0900 Subject: [PATCH] libct/init: unify init, fix its error logic @@ -17,7 +17,8 @@ Generally, our goals are: Signed-off-by: Kir Kolyshkin --- libcontainer/factory_linux.go | 5 +++-- - 1 file changed, 3 insertions(+), 2 deletions(-) + main_unix.go | 7 +++---- + 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/libcontainer/factory_linux.go b/libcontainer/factory_linux.go index e4ef518..0b2aa74 100644 @@ -40,6 +41,24 @@ index e4ef518..0b2aa74 100644 }() defer func() { if e := recover(); e != nil { +diff --git a/main_unix.go b/main_unix.go +index 0479949..24e64b9 100644 +--- a/main_unix.go ++++ b/main_unix.go +@@ -37,10 +37,9 @@ var initCommand = cli.Command{ + factory, _ := libcontainer.New("") + if err := factory.StartInitialization(); err != nil { + fmt.Fprintf(os.Stderr, "libcontainer: container start initialization failed: %s", err) +- // as the error is sent back to the parent there is no need to log +- // or write it to stderr because the parent process will handle this +- os.Exit(1) + } +- panic("libcontainer: container init failed to exec") ++ fmt.Fprint(os.Stderr, "libcontainer: container init failed to exec") ++ os.Exit(1) ++ return nil + }, + } -- 2.33.0 diff --git a/runc.spec b/runc.spec index fae19c7..f163970 100644 --- a/runc.spec +++ b/runc.spec @@ -2,7 +2,7 @@ Name: docker-runc Version: 1.0.0.rc3 -Release: 217 +Release: 218 Summary: runc is a CLI tool for spawning and running containers according to the OCI specification. License: ASL 2.0 @@ -41,6 +41,12 @@ install -p -m 755 runc $RPM_BUILD_ROOT/%{_bindir}/runc %{_bindir}/runc %changelog +* Thu Oct 26 2023 zhongjiawei - 1.0.0.rc3-218 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix the bug when runc syscall.Exec cmd not exist cause panic + * Tue Oct 24 2023 zhongjiawei - 1.0.0.rc3-217 - Type:bugfix - ID:NA