diff --git a/dbus/config.go b/dbus/config.go index 9301f62..27b5273 100644 --- a/dbus/config.go +++ b/dbus/config.go @@ -1,10 +1,5 @@ package dbus -import ( - "errors" - "strings" -) - type Config struct { // See set 'see' policy for NAME (--see=NAME) See []string `json:"see"` @@ -58,23 +53,6 @@ func (c *Config) Args(bus [2]string) (args []string) { return } -func (c *Config) buildSeal(seal *strings.Builder, bus [2]string) error { - for _, arg := range c.Args(bus) { - // reject argument strings containing null - for _, b := range arg { - if b == '\x00' { - return errors.New("argument contains null") - } - } - - // write null terminated argument - seal.WriteString(arg) - seal.WriteByte('\x00') - } - - return nil -} - // NewConfig returns a reference to a Config struct with optional defaults. // If id is an empty string own defaults are omitted. func NewConfig(id string, defaults, mpris bool) (c *Config) {