dbus

package
v0.0.0-...-2fb355d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 18, 2021 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Overview

Package dbus implements interaction between snappy and dbus.

Snappy creates dbus configuration files that describe how various services on the system bus can communicate with other peers.

Each configuration is an XML file containing <busconfig>...</busconfig>. Particular security snippets define whole <policy>...</policy> entires. This is explained in detail in https://dbus.freedesktop.org/doc/dbus-daemon.1.html

Package dbus implements interaction between snappy and dbus.

Snappy creates dbus configuration files that describe how various services on the system bus can communicate with other peers.

Each configuration is an XML file containing <busconfig>...</busconfig>. Particular security snippets define whole <policy>...</policy> entires.

NOTE: This interacts with systemd. TODO: Explain how this works (security).

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SafePath

func SafePath(s string) string

SafePath returns a string suitable for use in a DBus object

Types

type Backend

type Backend struct{}

Backend is responsible for maintaining DBus policy files.

func (*Backend) Initialize

Initialize does nothing.

func (*Backend) Name

func (b *Backend) Name() interfaces.SecuritySystem

Name returns the name of the backend.

func (*Backend) NewSpecification

func (b *Backend) NewSpecification() interfaces.Specification

func (*Backend) Remove

func (b *Backend) Remove(snapName string) error

Remove removes dbus configuration files of a given snap.

This method should be called after removing a snap.

func (*Backend) SandboxFeatures

func (b *Backend) SandboxFeatures() []string

SandboxFeatures returns list of features supported by snapd for dbus communication.

func (*Backend) Setup

Setup creates dbus configuration files specific to a given snap.

DBus has no concept of a complain mode so confinment type is ignored.

type Specification

type Specification struct {
	// contains filtered or unexported fields
}

Specification keeps all the dbus snippets.

func (*Specification) AddConnectedPlug

func (spec *Specification) AddConnectedPlug(iface interfaces.Interface, plug *interfaces.ConnectedPlug, slot *interfaces.ConnectedSlot) error

AddConnectedPlug records dbus-specific side-effects of having a connected plug.

func (*Specification) AddConnectedSlot

func (spec *Specification) AddConnectedSlot(iface interfaces.Interface, plug *interfaces.ConnectedPlug, slot *interfaces.ConnectedSlot) error

AddConnectedSlot records dbus-specific side-effects of having a connected slot.

func (*Specification) AddPermanentPlug

func (spec *Specification) AddPermanentPlug(iface interfaces.Interface, plug *snap.PlugInfo) error

AddPermanentPlug records dbus-specific side-effects of having a plug.

func (*Specification) AddPermanentSlot

func (spec *Specification) AddPermanentSlot(iface interfaces.Interface, slot *snap.SlotInfo) error

AddPermanentSlot records dbus-specific side-effects of having a slot.

func (*Specification) AddSnippet

func (spec *Specification) AddSnippet(snippet string)

AddSnippet adds a new dbus snippet.

func (*Specification) SecurityTags

func (spec *Specification) SecurityTags() []string

SecurityTags returns a list of security tags which have a snippet.

func (*Specification) SnippetForTag

func (spec *Specification) SnippetForTag(tag string) string

SnippetForTag returns a combined snippet for given security tag with individual snippets joined with newline character. Empty string is returned for non-existing security tag.

func (*Specification) Snippets

func (spec *Specification) Snippets() map[string][]string

Snippets returns a deep copy of all the added snippets.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL