aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJorge E. Moreira <jemoreira@google.com>2023-04-03 19:12:27 -0700
committerJorge E. Moreira <jemoreira@google.com>2023-04-03 19:12:27 -0700
commite2e8661912099dc3cfdd355cd134d6cf60461a0a (patch)
tree2fdf64c16e8332924486c4b36279fa06bd2e9a48
parent9a7dadc1834965e80ffeac3c7cd4610ca8baddc3 (diff)
downloadcuttlefish_vmm-e2e8661912099dc3cfdd355cd134d6cf60461a0a.tar.gz
rebuild script doesn't overwrite sepolicy changes
These changes were introduced in aosp/2276288 by manually modifying the sepolicy files. When running the rebuild script again those changes were lost and had to be re-applied from source control. Bug: 252979960 Test: run script manually and ensure no changes in sepolicy dir Change-Id: Ie947db46a91e365eadad17d4e1db46c4e07efb04
-rwxr-xr-xrebuild-internal.sh12
1 files changed, 12 insertions, 0 deletions
diff --git a/rebuild-internal.sh b/rebuild-internal.sh
index 72f0930..9ff3400 100755
--- a/rebuild-internal.sh
+++ b/rebuild-internal.sh
@@ -417,7 +417,19 @@ compile_crosvm_seccomp() {
echo "${ARCH} is not supported"
exit 15
esac
+
policy-inliner.sh -p $(pwd)/seccomp/$subdir -o ${OUTPUT_SECCOMP_DIR}
+
+ # The following check fails because the source is owned by a different user
+ git config --global --add safe.directory '*'
+ # This version of crosvm is missing some sepolicy configuration
+ if git log --oneline -n 1 | grep -qv ^6f1122f; then
+ return 0
+ fi
+ for policy_file in "${OUTPUT_SECCOMP_DIR}/"*.policy; do
+ grep -q clone3 "$policy_file" || echo -e "clone3: 1\nrseq: 1" >>"$policy_file"
+ done
+ echo "statx: 1" >>"${OUTPUT_SECCOMP_DIR}/vios_audio_device.policy"
}
compile() {