summaryrefslogtreecommitdiff
diff options
authorMichael Vogt <mvo@ubuntu.com>2017-05-10 21:30:00 +0200
committerMichael Vogt <mvo@ubuntu.com>2017-05-10 21:30:00 +0200
commit2381e692d6b13f6b96fb4a14ef8421bb23ba2ba6 (patch)
treeaae9401e89f52653d387ad4b554df5808e62dbf9
parent69eee7ca6d2569a94888fc18454f7d02b1131743 (diff)
fix broken master after merging the storage_framework_services branchfix-master
-rw-r--r--interfaces/builtin/storage_framework_service.go13
-rw-r--r--interfaces/builtin/storage_framework_service_test.go4
2 files changed, 4 insertions, 13 deletions
diff --git a/interfaces/builtin/storage_framework_service.go b/interfaces/builtin/storage_framework_service.go
index 8550f09a72..eb81693e4c 100644
--- a/interfaces/builtin/storage_framework_service.go
+++ b/interfaces/builtin/storage_framework_service.go
@@ -107,16 +107,7 @@ func (iface *StorageFrameworkServiceInterface) Name() string {
return "storage-framework-service"
}
-func (iface *StorageFrameworkServiceInterface) AppArmorConnectedPlug(spec *apparmor.Specification, plug *interfaces.Plug, slot *interfaces.Slot) error {
- snippet := storageFrameworkServiceConnectedPlugAppArmor
- old := "###SLOT_SECURITY_TAGS###"
- new := slotAppLabelExpr(slot)
- snippet = strings.Replace(snippet, old, new, -1)
- spec.AddSnippet(snippet)
- return nil
-}
-
-func (iface *StorageFrameworkServiceInterface) ApparmorConnectedPlug(spec *apparmor.Specification, plug *interfaces.Plug, slot *interfaces.Slot) error {
+func (iface *StorageFrameworkServiceInterface) AppArmorConnectedPlug(spec *apparmor.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error {
snippet := storageFrameworkServiceConnectedPlugAppArmor
old := "###SLOT_SECURITY_TAGS###"
new := slotAppLabelExpr(slot)
@@ -130,7 +121,7 @@ func (iface *StorageFrameworkServiceInterface) AppArmorPermanentSlot(spec *appar
return nil
}
-func (iface *StorageFrameworkServiceInterface) AppArmorConnectedSlot(spec *apparmor.Specification, plug *interfaces.Plug, slot *interfaces.Slot) error {
+func (iface *StorageFrameworkServiceInterface) AppArmorConnectedSlot(spec *apparmor.Specification, plug *interfaces.Plug, plugAttrs map[string]interface{}, slot *interfaces.Slot, slotAttrs map[string]interface{}) error {
snippet := storageFrameworkServiceConnectedSlotAppArmor
old := "###PLUG_SECURITY_TAGS###"
new := plugAppLabelExpr(plug)
diff --git a/interfaces/builtin/storage_framework_service_test.go b/interfaces/builtin/storage_framework_service_test.go
index ae8d35c50d..ff26c85f46 100644
--- a/interfaces/builtin/storage_framework_service_test.go
+++ b/interfaces/builtin/storage_framework_service_test.go
@@ -77,14 +77,14 @@ func (s *StorageFrameworkServiceInterfaceSuite) TestSanitizeIncorrectInterface(c
func (s *StorageFrameworkServiceInterfaceSuite) TestAppArmorConnectedPlug(c *C) {
spec := &apparmor.Specification{}
- c.Assert(spec.AddConnectedPlug(s.iface, s.plug, s.slot), IsNil)
+ c.Assert(spec.AddConnectedPlug(s.iface, s.plug, nil, s.slot, nil), IsNil)
c.Assert(spec.SecurityTags(), DeepEquals, []string{"snap.client.app"})
c.Assert(spec.SnippetForTag("snap.client.app"), testutil.Contains, `interface=com.canonical.StorageFramework.Registry`)
}
func (s *StorageFrameworkServiceInterfaceSuite) TestAppArmorConnectedSlot(c *C) {
spec := &apparmor.Specification{}
- c.Assert(spec.AddConnectedSlot(s.iface, s.plug, s.slot), IsNil)
+ c.Assert(spec.AddConnectedSlot(s.iface, s.plug, nil, s.slot, nil), IsNil)
c.Assert(spec.SecurityTags(), DeepEquals, []string{"snap.storage-framework-service.app"})
c.Assert(spec.SnippetForTag("snap.storage-framework-service.app"), testutil.Contains, `interface=com.canonical.StorageFramework`)
}