From ee108603572101ad3c285830e04ee248916b6c5d Mon Sep 17 00:00:00 2001 From: Ophestra Date: Mon, 17 Mar 2025 01:09:12 +0900 Subject: seccomp: install output atomically Signed-off-by: Ophestra --- helper/bwrap/seccomp.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'helper/bwrap/seccomp.go') diff --git a/helper/bwrap/seccomp.go b/helper/bwrap/seccomp.go index 8e55171b..f5132be3 100644 --- a/helper/bwrap/seccomp.go +++ b/helper/bwrap/seccomp.go @@ -48,20 +48,21 @@ func (c *Config) seccompArgs() FDBuilder { {c.Syscall.Bluetooth, seccomp.FlagBluetooth, "bluetooth"}, } ) - if seccomp.CPrintln != nil { + scmpPrintln := seccomp.GetOutput() + if scmpPrintln != nil { optd = make([]string, 1, len(optCond)+1) optd[0] = "common" } for _, opt := range optCond { if opt.v { opts |= opt.o - if seccomp.CPrintln != nil { + if scmpPrintln != nil { optd = append(optd, opt.d) } } } - if seccomp.CPrintln != nil { - seccomp.CPrintln(fmt.Sprintf("seccomp flags: %s", optd)) + if scmpPrintln != nil { + scmpPrintln(fmt.Sprintf("seccomp flags: %s", optd)) } return &seccompBuilder{seccomp.NewFile(opts)} -- cgit v1.3.1