Skip to content

Commit

Permalink
garnet: Fix seccomp rule addition with proper formatting across multi…
Browse files Browse the repository at this point in the history
…ple policies

Signed-off-by: kleidione <kleidione@gmail.com>
Co-authored-by: Arian <arian.kulmer@web.de>
  • Loading branch information
kleidione and ArianK16a committed Jan 22, 2025
1 parent 1d8b13a commit 6576853
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions extract-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,17 @@ function blob_fixup() {
[ "$2" = "" ] && return 0
sed -i 's/on charger/on property:init.svc.vendor.charger=running/g' "${2}"
;;
vendor/etc/seccomp_policy/atfwd@2.0.policy | vendor/etc/seccomp_policy/c2audio.vendor.ext-arm64.policy | vendor/etc/seccomp_policy/wfdhdcphalservice.policy)
[ "$2" = "" ] && return 0
case "$1" in
vendor/etc/seccomp_policy/c2audio.vendor.ext-arm64.policy)
grep -q "setsockopt: 1" "${2}" || { sed -i -e '$a\setsockopt: 1' "${2}"; }
;;
vendor/etc/seccomp_policy/atfwd@2.0.policy | vendor/etc/seccomp_policy/wfdhdcphalservice.policy)
grep -q "gettid: 1" "${2}" || { sed -i -e '$a\gettid: 1' "${2}"; }
;;
esac
;;
vendor/etc/media_codecs_parrot_v0.xml)
[ "$2" = "" ] && return 0
sed -i -E '/media_codecs_(google_audio|google_c2|google_telephony|vendor_audio)/d' "${2}"
Expand Down

0 comments on commit 6576853

Please sign in to comment.