init: Make sure ImageManager status files are labelled.

adb remount and snapshot-based updates use ImageManager in first-stage
init. This creates status files, which need to be labelled.

Bug: 148834619
Test: manual test
Change-Id: I72949fca2889f9e5612049844a78bf9355b48797
Merged-In: I72949fca2889f9e5612049844a78bf9355b48797
This commit is contained in:
David Anderson 2020-02-21 17:11:07 -08:00 committed by Yifan Hong
parent ae86eb783a
commit 960a81f4a1

View file

@ -535,7 +535,9 @@ void SelinuxRestoreContext() {
selinux_android_restorecon("/linkerconfig", 0);
selinux_android_restorecon(gsi::kDsuAvbKeyDir, SELINUX_ANDROID_RESTORECON_RECURSE);
// adb remount, snapshot-based updates, and DSUs all create files during
// first-stage init.
selinux_android_restorecon("/metadata", SELINUX_ANDROID_RESTORECON_RECURSE);
}
int SelinuxKlogCallback(int type, const char* fmt, ...) {