Lines Matching refs:policy_file
303 bool OpenSplitPolicy(PolicyFile* policy_file) { in OpenSplitPolicy() argument
330 policy_file->fd = std::move(fd); in OpenSplitPolicy()
331 policy_file->path = std::move(*res); in OpenSplitPolicy()
461 policy_file->fd = std::move(compiled_sepolicy_fd); in OpenSplitPolicy()
462 policy_file->path = compiled_sepolicy; in OpenSplitPolicy()
466 bool OpenMonolithicPolicy(PolicyFile* policy_file) { in OpenMonolithicPolicy() argument
470 policy_file->fd.reset(open(kSepolicyFile, O_RDONLY | O_CLOEXEC | O_NOFOLLOW)); in OpenMonolithicPolicy()
471 if (policy_file->fd < 0) { in OpenMonolithicPolicy()
475 policy_file->path = kSepolicyFile; in OpenMonolithicPolicy()
480 PolicyFile policy_file; in ReadPolicy() local
482 bool ok = IsSplitPolicyDevice() ? OpenSplitPolicy(&policy_file) in ReadPolicy()
483 : OpenMonolithicPolicy(&policy_file); in ReadPolicy()
488 if (!android::base::ReadFdToString(policy_file.fd, policy)) { in ReadPolicy()
489 PLOG(FATAL) << "Failed to read policy file: " << policy_file.path; in ReadPolicy()