From 9971bae91d9095dc47bc1c6075e623497b7bff99 Mon Sep 17 00:00:00 2001 From: Nikita Ioffe Date: Thu, 15 Jun 2023 17:01:11 +0100 Subject: 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 Merged-In: Ia1a65a4e69b27351941a290210004a93470ae87f (cherry picked from commit 56fd71b0d4466983d8f5c11466a43df1c6c3a998) --- cmds/installd/otapreopt_chroot.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/cmds/installd/otapreopt_chroot.cpp b/cmds/installd/otapreopt_chroot.cpp index 1b7acabf70..c86993cb06 100644 --- a/cmds/installd/otapreopt_chroot.cpp +++ b/cmds/installd/otapreopt_chroot.cpp @@ -165,7 +165,8 @@ static int otapreopt_chroot(const int argc, char **arg) { // 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]); -- cgit v1.2.3-59-g8ed1b