Loading cmds/cmd/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ cc_library_static { "libselinux", "libbinder", ], whole_static_libs: [ "libc++fs", ], cflags: [ "-Wall", Loading cmds/cmd/cmd.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <utils/Mutex.h> #include <utils/Vector.h> #include <filesystem> #include <getopt.h> #include <stdlib.h> #include <stdio.h> Loading Loading @@ -69,10 +70,8 @@ public: virtual int openFile(const String16& path, const String16& seLinuxContext, const String16& mode) { String8 path8(path); char cwd[256]; getcwd(cwd, 256); String8 fullPath(cwd); fullPath.appendPath(path8); auto fullPath = std::filesystem::current_path(); fullPath /= path8.c_str(); if (!mActive) { mErrorLog << "Open attempt after active for: " << fullPath << endl; return -EPERM; Loading Loading
cmds/cmd/Android.bp +3 −0 Original line number Diff line number Diff line Loading @@ -27,6 +27,9 @@ cc_library_static { "libselinux", "libbinder", ], whole_static_libs: [ "libc++fs", ], cflags: [ "-Wall", Loading
cmds/cmd/cmd.cpp +3 −4 Original line number Diff line number Diff line Loading @@ -27,6 +27,7 @@ #include <utils/Mutex.h> #include <utils/Vector.h> #include <filesystem> #include <getopt.h> #include <stdlib.h> #include <stdio.h> Loading Loading @@ -69,10 +70,8 @@ public: virtual int openFile(const String16& path, const String16& seLinuxContext, const String16& mode) { String8 path8(path); char cwd[256]; getcwd(cwd, 256); String8 fullPath(cwd); fullPath.appendPath(path8); auto fullPath = std::filesystem::current_path(); fullPath /= path8.c_str(); if (!mActive) { mErrorLog << "Open attempt after active for: " << fullPath << endl; return -EPERM; Loading