diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-16 19:02:52 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-16 19:03:34 +0900 |
| commit | 468696f611178598c8cc6b918f134e92e03e8c29 (patch) | |
| tree | 7464e4bce4cf2ad16e19a12f97799eebdb9efab6 /internal/linux/std.go | |
| parent | 29c38caac8a7fb828d6eb6b421943d2cb19ffd26 (diff) | |
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 <cat@gensokyo.uk>
Diffstat (limited to 'internal/linux/std.go')
| -rw-r--r-- | internal/linux/std.go | 2 |
1 files changed, 2 insertions, 0 deletions
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 |
