mirror of
https://github.com/SELinuxProject/setools
synced 2025-03-31 07:46:24 +00:00
PolicyCapability: Revise construction.
This commit is contained in:
parent
55f4e666ee
commit
2d14f43540
@ -23,12 +23,12 @@ cdef class PolicyCapability(PolicySymbol):
|
|||||||
|
|
||||||
"""A policy capability."""
|
"""A policy capability."""
|
||||||
|
|
||||||
cdef str name
|
cdef readonly str name
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
cdef factory(SELinuxPolicy policy, size_t bit):
|
cdef inline PolicyCapability factory(SELinuxPolicy policy, size_t bit):
|
||||||
"""Factory function for creating PolicyCapability objects."""
|
"""Factory function for creating PolicyCapability objects."""
|
||||||
r = PolicyCapability()
|
cdef PolicyCapability r = PolicyCapability.__new__(PolicyCapability)
|
||||||
r.policy = policy
|
r.policy = policy
|
||||||
r.name = intern(sepol.sepol_polcap_getname(bit))
|
r.name = intern(sepol.sepol_polcap_getname(bit))
|
||||||
return r
|
return r
|
||||||
|
Loading…
Reference in New Issue
Block a user