mirror of
https://github.com/SELinuxProject/selinux
synced 2024-12-18 12:14:33 +00:00
python/sepolgen: fix access vector initialization
In access module, in AccessVector.__init__() method, when init_list is not None, the access vector is initialized by from_list() method. However, this method does not assign attributes self.audit_msgs, self.type, and self.data. Fix this by assigning these attributes in __init__() method. Signed-off-by: Jan Zarsky <jzarsky@redhat.com>
This commit is contained in:
parent
a98314d8c1
commit
474f9b08d4
@ -87,9 +87,10 @@ class AccessVector(util.Comparison):
|
||||
self.tgt_type = None
|
||||
self.obj_class = None
|
||||
self.perms = refpolicy.IdSet()
|
||||
self.audit_msgs = []
|
||||
self.type = audit2why.TERULE
|
||||
self.data = []
|
||||
|
||||
self.audit_msgs = []
|
||||
self.type = audit2why.TERULE
|
||||
self.data = []
|
||||
# when implementing __eq__ also __hash__ is needed on py2
|
||||
# if object is muttable __hash__ should be None
|
||||
self.__hash__ = None
|
||||
|
Loading…
Reference in New Issue
Block a user