From aa3980ec83be167d3e3065ced02fef1b1db2320c Mon Sep 17 00:00:00 2001 From: Tobias Ulmer Date: Wed, 7 Oct 2015 20:51:12 +0200 Subject: [PATCH] init: close everything but stdin, stdout and stderr Signed-off-by: Tobias Ulmer --- Changelog | 2 ++ generic/e2lib.lua | 3 +++ 2 files changed, 5 insertions(+) diff --git a/Changelog b/Changelog index ffd8945..a04461c 100644 --- a/Changelog +++ b/Changelog @@ -1,4 +1,6 @@ NEXT: + * On startup, close all file descriptors except for stdin, stdout, and stderr + as a precautionary measure. * luafile.open() sets FD_CLOEXEC by default * Fix incorrect use of shquote(), preventing x86_64 chroot builds * Fix regression preventing use of x86_64 chroot diff --git a/generic/e2lib.lua b/generic/e2lib.lua index fb340a9..78d01d9 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -138,6 +138,9 @@ function e2lib.init() e2lib.abort(re) end + e2util.closefrom(3) + -- ignore errors, no /proc should not prevent factory from working + e2lib.globals.warn_category = { WDEFAULT = false, WDEPRECATED = false, -- 2.39.5