Porting to oreo-x86 codebase of nougat-x86 commit
bca7b1f81f "fd_utils: fix DEBUG mode booting issue"
Original commit message:
Remove the "/android/" prefix before the white list checking.
Suggested by Chris Vandomelen <chris@sightworks.com>.
const std::string fd_path = android::base::StringPrintf("/proc/self/fd/%d", fd);
if (!android::base::Readlink(fd_path, &file_path)) {
return NULL;
+ } else if (!strncmp(file_path.c_str(), "/android/", 9)) {
+ file_path = file_path.substr(8);
}
if (!whitelist->IsAllowed(file_path)) {