Skip to content

Commit bdb3bc4

Browse files
Treehugger Robotandroid-build-merge-worker-robot
authored andcommitted
Merge "Enable searching for mounted public volumes under any user" into main am: 52b4e75 am: 8ebdab5
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/3431354 Change-Id: I6fc5ba981ae8261e148bc519dad51fb7ef3767f0 Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2 parents c2366c3 + 8ebdab5 commit bdb3bc4

1 file changed

Lines changed: 3 additions & 2 deletions

File tree

cmds/installd/InstalldNativeService.cpp

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,6 @@ static constexpr const char* kFuseProp = "persist.sys.fuse";
119119
*/
120120
static constexpr const char* kAppDataIsolationEnabledProperty = "persist.zygote.app_data_isolation";
121121
static constexpr const char* kMntSdcardfs = "/mnt/runtime/default/";
122-
static constexpr const char* kMntFuse = "/mnt/pass_through/0/";
123122

124123
static std::atomic<bool> sAppDataIsolationEnabled(false);
125124

@@ -3697,7 +3696,9 @@ binder::Status InstalldNativeService::invalidateMounts() {
36973696
std::getline(in, ignored);
36983697

36993698
if (android::base::GetBoolProperty(kFuseProp, false)) {
3700-
if (target.find(kMntFuse) == 0) {
3699+
const std::regex kMntFuseRe =
3700+
std::regex(R"(^/mnt/pass_through/(0|[0-9]+/[A-Z0-9]{4}-[A-Z0-9]{4}).*)");
3701+
if (std::regex_match(target, kMntFuseRe)) {
37013702
LOG(DEBUG) << "Found storage mount " << source << " at " << target;
37023703
mStorageMounts[source] = target;
37033704
}

0 commit comments

Comments
 (0)