Add ability to specify multiple input files to the selabel_open.
The file_contexts labeling backend, specified in label_file.c, currently assumes
that only one path will be specified as an option to selabel_open(). The split
of platform and non-platform policy on device, however, will necessitate the
loading of two disparate policy files. Rather than combining the files and then
calling the existing API on a newly-formed file, just add the ability to specify
multiple files to use. Order of opt specification to selabel_open matters.
update: Fixed a double-free in the original change that caused the
updater to randomly crash during OTA (b/33938747)
Bug: 31363362
Bug: 33938747
Test: Device builds and boots w/no additional denials with split context files.
Test: Angler can successfully finish sideloaded OTA with updater binary
that is with this change
Change-Id: I85cd1525990f6ad054861e62327bd9c2aac03b02
Signed-off-by: Daniel Cashman <dcashman@google.com>
Signed-off-by: Sandeep Patil <sspatil@google.com>
3 files changed