Browse Source

qubespolicy: fix handling icons dictionary

Build icons dictionary from all provided icons, not only those allowed
as target. Specifically, source may not be allowed target (but the
window need its icon).
Marek Marczykowski-Górecki 6 years ago
parent
commit
38bc751b97
1 changed files with 3 additions and 3 deletions
  1. 3 3
      qubespolicy/agent.py

+ 3 - 3
qubespolicy/agent.py

@@ -54,9 +54,9 @@ class PolicyAgent(object):
             icons):
         # pylint: disable=invalid-name
         entries_info = {}
-        for target in targets:
-            entries_info[target] = {}
-            entries_info[target]['icon'] = icons.get(target, None)
+        for entry in icons:
+            entries_info[entry] = {}
+            entries_info[entry]['icon'] = icons.get(entry, None)
 
         response = qubespolicy.rpcconfirmation.confirm_rpc(
             entries_info, source, service_name,