From: Stefan Schantl Date: Sat, 11 Mar 2023 11:41:16 +0000 (+0000) Subject: mc: Proper harden consaver binary X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=28792af2436c86c7e36b6227cd203a50baeea343;p=ipfire-3.x.git mc: Proper harden consaver binary Signed-off-by: Michael Tremer --- diff --git a/mc/mc.nm b/mc/mc.nm index 4830ff4d0..1fe8161a6 100644 --- a/mc/mc.nm +++ b/mc/mc.nm @@ -5,7 +5,7 @@ name = mc version = 4.8.29 -release = 2 +release = 3 groups = Applications/System url = https://midnight-commander.org @@ -40,6 +40,13 @@ build --enable-charset \ --disable-rpath + configure_cmds + # Add some additional CFLAGS to the consaver Makefile to proper + # harden the binary. + sed -i '/^CFLAGS =/ s/$/ -fno-builtin-exit -D__noreturn__=/' \ + src/consaver/Makefile + end + install_cmds # Fix permissions chmod 1755 %{BUILDROOT}/usr/lib/mc/cons.saver