seccomp: install output atomically
All checks were successful
Test / Create distribution (push) Successful in 24s
Test / Fortify (push) Successful in 2m33s
Test / Fpkg (push) Successful in 3m17s
Test / Data race detector (push) Successful in 4m1s
Test / Flake checks (push) Successful in 49s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
2025-03-17 01:09:12 +09:00
parent 44277dc0f1
commit ee10860357
10 changed files with 59 additions and 39 deletions

View File

@@ -26,7 +26,6 @@ import (
"git.gensokyo.uk/security/fortify/internal/sandbox"
"git.gensokyo.uk/security/fortify/internal/state"
"git.gensokyo.uk/security/fortify/internal/sys"
"git.gensokyo.uk/security/fortify/seccomp"
"git.gensokyo.uk/security/fortify/system"
)
@@ -71,10 +70,7 @@ func buildCommand(out io.Writer) command.Command {
flagJSON bool
)
c := command.New(out, log.Printf, "fortify", func([]string) error {
fmsg.Store(flagVerbose)
if flagVerbose {
seccomp.CPrintln = log.Println
}
internal.InstallFmsg(flagVerbose)
return nil
}).
Flag(&flagVerbose, "v", command.BoolFlag(false), "Print debug messages to the console").