diff options
| author | Ophestra <cat@gensokyo.uk> | 2025-02-07 13:42:17 +0900 |
|---|---|---|
| committer | Ophestra <cat@gensokyo.uk> | 2025-02-07 13:42:29 +0900 |
| commit | 72fb13dcccd3b6c8c443c98fb2a103e8d607f2fc (patch) | |
| tree | ccc451cce0bd2896ffb028dfa64d782bb82cd67e /dbus | |
| parent | a48386bd5605f989593a0f53847dc49861d10154 (diff) | |
dbus: lock for read in public args interface
Signed-off-by: Ophestra <cat@gensokyo.uk>
Diffstat (limited to 'dbus')
| -rw-r--r-- | dbus/proxy.go | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/dbus/proxy.go b/dbus/proxy.go index 59b887d2..e547855d 100644 --- a/dbus/proxy.go +++ b/dbus/proxy.go @@ -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() } |
