Add cap_setuid to launchpad-process-pool in dev_wos mode 71/318871/7 accepted/tizen/unified/20250217.155043 accepted/tizen/unified/x/20250221.042202
authorTomasz Swierczek <t.swierczek@samsung.com>
Wed, 29 Jan 2025 09:32:43 +0000 (10:32 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Thu, 30 Jan 2025 13:15:33 +0000 (14:15 +0100)
Added outside set_capability script as its a dev_wos-only
modification, so far only for PoC.

Change-Id: I86fe560d2ed5a34455d92577ce846f6dc47738e1

config/generate_configure_wos

index ccdb0de9981cf49359a0200b76784b7b9eaad881..8b3512c718b3dacb81b0248bf56e8cb89b0cbfe9 100755 (executable)
@@ -3,6 +3,15 @@ set -euo pipefail
 
 PATH=/bin:/usr/bin:/sbin:/usr/sbin
 
+function add_missing_caps {
+       # launchpad needs additional caps, re-setting them here with additional cap_setuid
+       if [ -e "/usr/bin/launchpad-process-pool" ]
+       then
+               existing_caps=`/usr/sbin/getcap /usr/bin/launchpad-process-pool | cut -f2- -d" "`
+               /usr/sbin/setcap "${existing_caps} cap_setuid=eip" /usr/bin/launchpad-process-pool
+       fi
+}
+
 function add_groups {
        groupadd --force system_access
        groupadd --force app_access
@@ -28,3 +37,4 @@ echo ')'
 
 echo 'add_groups'
 echo 'add_services_to_system_access_group "${services[@]}"'
+echo 'add_missing_caps'