def load(self, policy: Policy): super().load(policy) state = self.calculate_state_number(policy) for family in self.family: Commands.add_net_rule( policy.profile, NET_ACCESS.from_list(self.operation), NET_FAMILY.from_string(family), BPFBOX_ACTION.from_list(self.action), state, )
def load(self, policy: Policy): super().load(policy) state = self.calculate_state_number(policy) for target in self.target: Commands.add_ipc_rule( policy.profile, target, IPC_ACCESS.from_list(self.signal), BPFBOX_ACTION.from_list(self.action), state, )
def load(self, policy: Policy): super().load(policy) state = self.calculate_state_number(policy) for _file in self.file: Commands.add_fs_rule( policy.profile, _file, FS_ACCESS.from_list(self.access), BPFBOX_ACTION.from_list(self.action), state=state, )