selinonlib.migrations.tainted_flow_strategy module

Strategies used when migrations are preformed.

class selinonlib.migrations.tainted_flow_strategy.TaintedFlowStrategy[source]

Bases: enum.Enum

Strategies used when migrations are preformed.

FAIL = 3
IGNORE = 1
RETRY = 2
classmethod get_default_option()[source]

Get default option for migration strategies.

classmethod get_option_by_name(name)[source]

Get option by its string representation.

Parameters:name – option string representation
Returns:option for the given name representation
classmethod get_option_names()[source]

Get names of all options.

classmethod get_options()[source]

Get all options.

classmethod get_preferred_strategy(strategy1, strategy2)[source]

Get preferred strategy in case of multiple migrations being done at once.

Chose strategy with higher priority - if two migrations are done at the same time one marked as IGNORE another as RETRY, we have to retry flow.

Parameters:
Returns:

strategy with higher priority

Return type:

TaintedFlowStrategy