| |
@@ -734,10 +734,10 @@
|
| |
def __typeMatch(self, context, type_list):
|
| |
# get array of context type and it's aliases
|
| |
try:
|
| |
- _info = info(TYPE, context.type)[0]
|
| |
+ _info = next(info(TYPE, context.type))
|
| |
ctypes = _info.get('aliases', [])
|
| |
ctypes.append(_info['name'])
|
| |
- except (RuntimeError, IndexError):
|
| |
+ except (RuntimeError, IndexError, StopIteration):
|
| |
ctypes = [context.type]
|
| |
|
| |
for type in type_list:
|
| |
Commit c55edb3 ("framework: Fix AVC.__typeMatch to handle aliases
properly") was forward ported from stable branch. Unfortunately, stable branch
is supposed to be used with sepolicy version which generates a list, while
master branch is used with version generating a generator.
Fixes:
Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1784564