Change the user of update-manager.service to root 27/275327/2
authorMateusz Moscicki <m.moscicki2@partner.samsung.com>
Fri, 20 May 2022 12:00:35 +0000 (14:00 +0200)
committerMateusz Moscicki <m.moscicki2@partner.samsung.com>
Fri, 20 May 2022 15:11:12 +0000 (17:11 +0200)
During the upgrade the service must run the delta.ua program supplied in
the delta.tar file to correctly execute the entire process.

Thus, it's infeasible to depend on POSIX file capabilities as the
delta.ua from upgrade package (delta.tar) will not have it.  This leaves
us with either (1) need to apply needed caps in runtime (de facto
requiring super privileges for the process controlling this action), or
(2) simplifying the process and changing the user of update-manager to
root.

This commit implements (2) option as, in practice, this program is
responsible for flashing complete platform images so it effectively has
every permission possible (as it can flash any data of its choosing)

Change-Id: I33477c7a9981fb59effd1846c8733ff8e77c752b

packaging/update-manager.conf
packaging/update-manager.service

index 3ac2fa75a92f3dbcc8103ad83496de13e448aa0d..cd79be4389edc6c5618934353cd4573e15cc4030 100644 (file)
@@ -2,7 +2,7 @@
           "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
           "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
 <busconfig>
-  <policy user="system_fw">
+  <policy user="root">
     <allow own="org.tizen.update.manager"/>
   </policy>
   <policy context="default">
@@ -12,4 +12,4 @@
     <allow send_destination="org.tizen.update.manager" send_interface="org.tizen.update.manager" send_member="result" />
     <allow send_destination="org.tizen.update.manager" send_interface="org.freedesktop.DBus.Properties" send_member="GetAll" />
   </policy>
-</busconfig>
\ No newline at end of file
+</busconfig>
index 6532e7a3a6321005a0526aebc56bf890a6d9c506..d2ee157b7d989ef680a14a0274b68055fb74622e 100644 (file)
@@ -4,11 +4,9 @@ After=ac.service
 Requires=ac.service
 
 [Service]
-User=system_fw
-Group=system_fw
+User=root
+Group=root
 Type=simple
-Capabilities=cap_sys_admin,cap_dac_override=i
-SecureBits=keep-caps
 SmackProcessLabel=System
 ExecStart=/usr/bin/update-manager
 Restart=on-failure