build: update directives with the new interface.

This commit is contained in:
Alexandre Pujol 2024-03-25 22:40:25 +00:00
parent 38e9e5f08e
commit 08d4110c2a
No known key found for this signature in database
GPG key ID: C5469996F0DF68EC
9 changed files with 63 additions and 89 deletions

View file

@ -18,6 +18,7 @@ import (
"strings"
"github.com/roddhjav/apparmor.d/pkg/aa"
"github.com/roddhjav/apparmor.d/pkg/prebuild/cfg"
)
var defaultInterfaces = []string{
@ -26,17 +27,18 @@ var defaultInterfaces = []string{
}
type Dbus struct {
DirectiveBase
cfg.Base
}
func init() {
Directives["dbus"] = &Dbus{
DirectiveBase: DirectiveBase{
message: "Dbus directive applied",
usage: `#aa:dbus own bus=(system | session) name=<interface>
#aa:dbus talk bus=(system | session) name=<interface> label=<profile_name>`,
RegisterDirective(&Dbus{
Base: cfg.Base{
Keyword: "dbus",
Msg: "Dbus directive applied",
Help: `#aa:dbus own bus=<bus> name=<name> [interface=AARE] [path=AARE]
#aa:dbus talk bus=<bus> name=<name> label=<profile> [interface=AARE] [path=AARE]`,
},
}
})
}
func setInterfaces(rules map[string]string) []string {