runc/patch/0021-runc-disable-core-dump-during-exec.patch
zhongjiawei 5fee2ff802 runc: upgrade runc verison to 1.1.3
(cherry picked from commit 43a94523cb5d1db7aa39fd12d8c240861502ff92)
2023-01-10 20:39:35 +08:00

26 lines
819 B
Diff

From c8bf02dafed3537cd295c0898804809744f02f1e Mon Sep 17 00:00:00 2001
From: zhongjiawei <zhongjiawei1@huawei.com>
Date: Thu, 5 Jan 2023 16:38:29 +0800
Subject: [PATCH] runc:disable core dump during exec
---
libcontainer/process_linux.go | 2 ++
1 file changed, 2 insertions(+)
diff --git a/libcontainer/process_linux.go b/libcontainer/process_linux.go
index 29408d7..75d05b7 100644
--- a/libcontainer/process_linux.go
+++ b/libcontainer/process_linux.go
@@ -79,6 +79,8 @@ func (p *setnsProcess) signal(sig os.Signal) error {
}
func (p *setnsProcess) start() (retErr error) {
+ unix.Prctl(unix.PR_SET_DUMPABLE, 0, 0, 0, 0)
+ defer unix.Prctl(unix.PR_SET_DUMPABLE, 1, 0, 0, 0)
defer p.messageSockPair.parent.Close()
// get the "before" value of oom kill count
oom, _ := p.manager.OOMKillCount()
--
2.30.0