edecca
From 254da75ea1a9c2cade909534153f444bb8981c2a Mon Sep 17 00:00:00 2001
edecca
Message-Id: <254da75ea1a9c2cade909534153f444bb8981c2a@dist-git>
edecca
From: John Ferlan <jferlan@redhat.com>
edecca
Date: Mon, 27 Aug 2018 08:27:47 -0400
edecca
Subject: [PATCH] access: Fix nwfilter-binding ACL access API name generation
edecca
MIME-Version: 1.0
edecca
Content-Type: text/plain; charset=UTF-8
edecca
Content-Transfer-Encoding: 8bit
edecca
edecca
https://bugzilla.redhat.com/show_bug.cgi?id=1611320
edecca
edecca
Generation of the ACL API policy is a "automated process"
edecca
based on this perl script which "worked" with the changes to
edecca
add nwfilter binding API's because they had the "nwfilter"
edecca
prefix; however, the generated output name was incorrect
edecca
based on the remote protocol algorithm which expected to
edecca
generate names such as 'nwfilter-binding.action' instead
edecca
of 'nwfilter.binding-action'.
edecca
edecca
This effectively changes src/access/org.libvirt.api.policy entries:
edecca
edecca
  org.libvirt.api.nwfilter.binding-create ==>
edecca
      org.libvirt.api.nwfilter-binding.create
edecca
edecca
  org.libvirt.api.nwfilter.binding-delete ==>
edecca
      org.libvirt.api.nwfilter-binding.delete
edecca
edecca
  org.libvirt.api.nwfilter.binding-getattr ==>
edecca
      org.libvirt.api.nwfilter-binding.getattr
edecca
edecca
  org.libvirt.api.nwfilter.binding-read ==>
edecca
      org.libvirt.api.nwfilter-binding.read
edecca
edecca
Signed-off-by: John Ferlan <jferlan@redhat.com>
edecca
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
edecca
(cherry picked from commit 6ef65e3c96d5d1f16a16daca83b81b818d461e64)
edecca
https: //bugzilla.redhat.com/show_bug.cgi?id=1622540
edecca
Reviewed-by: Erik Skultety <eskultet@redhat.com>
edecca
---
edecca
 src/access/genpolkit.pl | 4 ++--
edecca
 1 file changed, 2 insertions(+), 2 deletions(-)
edecca
edecca
diff --git a/src/access/genpolkit.pl b/src/access/genpolkit.pl
edecca
index 968cb8c55c..e074c90eb6 100755
edecca
--- a/src/access/genpolkit.pl
edecca
+++ b/src/access/genpolkit.pl
edecca
@@ -22,8 +22,8 @@ use warnings;
edecca
 
edecca
 my @objects = (
edecca
     "CONNECT", "DOMAIN", "INTERFACE",
edecca
-    "NETWORK","NODE_DEVICE", "NWFILTER",
edecca
-     "SECRET", "STORAGE_POOL", "STORAGE_VOL",
edecca
+    "NETWORK","NODE_DEVICE", "NWFILTER_BINDING", "NWFILTER",
edecca
+    "SECRET", "STORAGE_POOL", "STORAGE_VOL",
edecca
     );
edecca
 
edecca
 my $objects = join ("|", @objects);
edecca
-- 
edecca
2.18.0
edecca