Skip children in fixupAppData() when parent shady.
If we find a directory with a shady GID, skip traversing into child
directories (if any), since we'll probably end up spamming the log
with every single item inside.
Test: builds, boots
Bug: 65852352
Change-Id: I8f03864adef572fc277e34e9f1589d9664fc75b3
diff --git a/cmds/installd/InstalldNativeService.cpp b/cmds/installd/InstalldNativeService.cpp
index af7455a..3fdf44d 100644
--- a/cmds/installd/InstalldNativeService.cpp
+++ b/cmds/installd/InstalldNativeService.cpp
@@ -711,6 +711,9 @@
// Ignore all other GID transitions, since they're kinda shady
LOG(WARNING) << "Ignoring " << p->fts_path << " with unexpected GID " << actual
<< " instead of " << expected;
+ if (!(flags & FLAG_FORCE)) {
+ fts_set(fts, p, FTS_SKIP);
+ }
}
}
}