Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
88 changes: 44 additions & 44 deletions setools/policyrep.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ class PolicySymbol(PolicyObject):
def __contains__(self, other) -> bool: ...
def expand(self) -> Iterable["PolicySymbol"]: ...

class PolicyEnum(enum.Enum):
class PolicyEnum(enum.Enum): # type: ignore[misc]
@classmethod
def lookup(cls, value) -> Any: ...

Expand Down Expand Up @@ -114,7 +114,7 @@ class Bounds(PolicyObject):
ruletype: "BoundsRuletype" = ...

class BoundsRuletype(PolicyEnum):
typebounds: int = ...
typebounds = ...

class Category(PolicySymbol):
def aliases(self, *args, **kwargs) -> Iterable[str]: ...
Expand Down Expand Up @@ -157,10 +157,10 @@ class ConstraintExpression(PolicyObject):
def __iter__(self) -> Iterator[frozenset["Role"] | frozenset["Type"] | frozenset["User"] | str]: ...

class ConstraintRuletype(PolicyEnum):
constrain: int = ...
mlsconstrain: int = ...
mlsvalidatetrans: int = ...
validatetrans: int = ...
constrain = ...
mlsconstrain = ...
mlsvalidatetrans = ...
validatetrans = ...

class Context(PolicyObject):
range_: "Range" = ...
Expand All @@ -177,22 +177,22 @@ class DefaultRange(Default):
default_range: "DefaultRangeValue" = ...

class DefaultRangeValue(PolicyEnum):
high: int = ...
low: int = ...
low_high: int = ...
high = ...
low = ...
low_high = ...
@classmethod
def from_default_range(cls, range: int | None) -> "DefaultRangeValue" | None: ...

class DefaultRuletype(PolicyEnum):
default_range: int = ...
default_role: int = ...
default_type: int = ...
default_user: int = ...
default_range = ...
default_role = ...
default_type = ...
default_user = ...

class DefaultValue(PolicyEnum):
glblub: int = ...
source: int = ...
target: int = ...
glblub = ...
source = ...
target = ...
@classmethod
def from_default_range(cls, *args, **kwargs) -> "DefaultValue": ...

Expand All @@ -204,9 +204,9 @@ class FSUse(Ocontext):
ruletype: "FSUseRuletype" = ...

class FSUseRuletype(PolicyEnum):
fs_use_task: int = ...
fs_use_trans: int = ...
fs_use_xattr: int = ...
fs_use_task = ...
fs_use_trans = ...
fs_use_xattr = ...

class FileNameTERule(BaseTERule):
default: "Type" = ...
Expand All @@ -227,9 +227,9 @@ class Genfscon(Ocontext):
tclass: "ObjClass" = ...

class HandleUnknown(PolicyEnum):
allow: int = ...
deny: int = ...
reject: int = ...
allow = ...
deny = ...
reject = ...

class Ibendportcon(Ocontext):
name: str = ...
Expand Down Expand Up @@ -284,7 +284,7 @@ class MLSRule(PolicyRule):
def expand(self) -> Iterable["MLSRule"]: ...

class MLSRuletype(PolicyEnum):
range_transition: int = ...
range_transition = ...

class Netifcon(Ocontext):
netif: str = ...
Expand All @@ -295,8 +295,8 @@ class Nodecon(Ocontext):
network: ipaddress.IPv4Network | ipaddress.IPv6Network = ...

class NodeconIPVersion(PolicyEnum):
ipv4: int = ...
ipv6: int = ...
ipv4 = ...
ipv6 = ...

class ObjClass(PolicySymbol):
common: "Common" = ...
Expand All @@ -314,27 +314,27 @@ class Pirqcon(Ocontext):
class PolicyCapability(PolicySymbol): ...

class PolicyTarget(PolicyEnum):
selinux: int = ...
xen: int = ...
selinux = ...
xen = ...

class Portcon(Ocontext):
ports: "PortconRange" = ...
protocol: "PortconProtocol" = ...

class PortconProtocol(PolicyEnum):
dccp: int = ...
sctp: int = ...
tcp: int = ...
udp: int = ...
dccp = ...
sctp = ...
tcp = ...
udp = ...

@dataclass(eq=True, order=True, frozen=True)
class PortconRange:
high: int = ...
low: int = ...

class RBACRuletype(PolicyEnum):
allow: int = ...
role_transition: int = ...
allow = ...
role_transition = ...

class Range(PolicyObject):
high: Level = ...
Expand Down Expand Up @@ -472,17 +472,17 @@ class TERule(BaseTERule):
def expand(self) -> Iterable["TERule"]: ...

class TERuletype(PolicyEnum):
allow: int = ...
allowxperm: int = ...
auditallow: int = ...
auditallowxperm: int = ...
dontaudit: int = ...
dontauditxperm: int = ...
neverallow: int = ...
neverallowxperm: int = ...
type_change: int = ...
type_member: int = ...
type_transition: int = ...
allow = ...
allowxperm = ...
auditallow = ...
auditallowxperm = ...
dontaudit = ...
dontauditxperm = ...
neverallow = ...
neverallowxperm = ...
type_change = ...
type_member = ...
type_transition = ...

@dataclass
class TruthTableRow:
Expand Down