dbus: lock for read in public args interface
All checks were successful
Test / Create distribution (push) Successful in 1m27s
Test / Run NixOS test (push) Successful in 4m2s

Signed-off-by: Ophestra <cat@gensokyo.uk>
This commit is contained in:
Ophestra 2025-02-07 13:42:17 +09:00
parent a48386bd56
commit 72fb13dccc
Signed by: cat
SSH Key Fingerprint: SHA256:gQ67O0enBZ7UdZypgtspB2FDM1g3GVw8nX0XSdcFw8Q

View File

@ -66,7 +66,14 @@ func (p *Proxy) String() string {
return "(unsealed dbus proxy)"
}
// BwrapStatic builds static bwrap args. This omits any fd-dependant args.
func (p *Proxy) BwrapStatic() []string {
p.lock.RLock()
defer p.lock.RUnlock()
if p.bwrap == nil {
return nil
}
return p.bwrap.Args()
}