Also mount /sys/fs/selinux
This mount point is required for apexd, which uses libselinux to adjust
label of the compressed APEXes that are decompressed as part of the
postinstall hook.
Bug: 284277137
Test: m dist
Test: system/update_engine/scripts/update_device.py out/dist/ota.zip
Change-Id: Ia1a65a4e69b27351941a290210004a93470ae87f
diff --git a/cmds/installd/otapreopt_chroot.cpp b/cmds/installd/otapreopt_chroot.cpp
index 1b7acab..c86993c 100644
--- a/cmds/installd/otapreopt_chroot.cpp
+++ b/cmds/installd/otapreopt_chroot.cpp
@@ -165,7 +165,8 @@
// Bind mount necessary directories.
constexpr const char* kBindMounts[] = {
- "/data", "/dev", "/proc", "/sys"
+ "/data", "/dev", "/proc", "/sys",
+ "/sys/fs/selinux" /* Required for apexd which includes libselinux */
};
for (size_t i = 0; i < arraysize(kBindMounts); ++i) {
std::string trg = StringPrintf("/postinstall%s", kBindMounts[i]);