OSDN Git Service

fd_utils: fix DEBUG mode booting issue android-x86-6.0-r2
authorChih-Wei Huang <cwhuang@linux.org.tw>
Sun, 8 Jan 2017 16:11:43 +0000 (00:11 +0800)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Tue, 10 Jan 2017 14:10:09 +0000 (22:10 +0800)
Remove the "/android/" prefix before the white list checking.

Suggested by Chris Vandomelen <chris@sightworks.com>.

core/jni/fd_utils-inl.h

index a348745..df251b2 100644 (file)
@@ -108,6 +108,8 @@ class FileDescriptorInfo {
     std::string file_path;
     if (!Readlink(fd, &file_path)) {
       return NULL;
+    } else if (!strncmp(file_path.c_str(), "/android/", 9)) {
+        file_path = file_path.substr(8);
     }
 
     if (!IsWhitelisted(file_path)) {