in src/enclave_proc/connection.rs [127:145]
fn can_execute_command(&self, cmd: EnclaveProcessCommandType, creds: &UnixCredentials) -> bool {
// Search for a policy rule on the provided user ID.
if self.find_policy_rule(cmd, &CommandRequesterType::User(creds.uid())) {
return true;
}
// Search for a policy rule on the provided group ID.
if self.find_policy_rule(cmd, &CommandRequesterType::Group(creds.gid())) {
return true;
}
// Search for a policy rule on all other users.
if self.find_policy_rule(cmd, &CommandRequesterType::Others) {
return true;
}
// If we haven't found any applicable policy rule we can't allow the command to be executed.
false
}