diff options
| author | Ophestra Umiker <cat@ophivana.moe> | 2024-10-16 01:27:49 +0900 |
|---|---|---|
| committer | Ophestra Umiker <cat@ophivana.moe> | 2024-10-16 01:27:49 +0900 |
| commit | 33cf0bed540a9b2c439bdca4869af8faf9f52cf4 (patch) | |
| tree | 424da848fc62a3fc3fc6af4a0c81010ba809a3f7 | |
| parent | 689f5bed5723534b79af52ef5cde80038c77ec0e (diff) | |
dbus: various accessors for dbus.Proxy internal fields
These values are useful during sandbox setup and exporting them makes more sense than storing them twice.
Signed-off-by: Ophestra Umiker <cat@ophivana.moe>
| -rw-r--r-- | dbus/proxy.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/dbus/proxy.go b/dbus/proxy.go index 7e7d9a65..f3474a8e 100644 --- a/dbus/proxy.go +++ b/dbus/proxy.go @@ -28,6 +28,21 @@ type Proxy struct { lock sync.RWMutex } +func (p *Proxy) Session() [2]string { + return p.session +} + +func (p *Proxy) System() [2]string { + return p.system +} + +func (p *Proxy) Sealed() bool { + p.lock.RLock() + defer p.lock.RUnlock() + + return p.seal != nil +} + var ( ErrConfig = errors.New("no configuration to seal") ) |
