From 468696f611178598c8cc6b918f134e92e03e8c29 Mon Sep 17 00:00:00 2001 From: Ophestra Date: Sun, 16 Feb 2025 19:02:52 +0900 Subject: internal: beforeExit before reachable fatal calls These are the only two calls to log.Fatal* reachable during suspended output. Call fmsg.BeforeExit here to catch that. Signed-off-by: Ophestra --- internal/linux/std.go | 2 ++ 1 file changed, 2 insertions(+) (limited to 'internal/linux/std.go') diff --git a/internal/linux/std.go b/internal/linux/std.go index 4850cf94..fceba95f 100644 --- a/internal/linux/std.go +++ b/internal/linux/std.go @@ -13,6 +13,7 @@ import ( "syscall" "git.gensokyo.uk/security/fortify/internal" + "git.gensokyo.uk/security/fortify/internal/fmsg" ) // Std implements System using the standard library. @@ -73,6 +74,7 @@ func (s *Std) Uid(aid int) (int, error) { u.uid = -1 if fsu, ok := internal.Check(internal.Fsu); !ok { + fmsg.BeforeExit() log.Fatal("invalid fsu path, this copy of fortify is not compiled correctly") // unreachable return 0, syscall.EBADE -- cgit v1.3.1