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