Revise service file to add capabilities option 21/170921/1
authorSangchul Lee <sc11.lee@samsung.com>
Wed, 20 Dec 2017 02:45:53 +0000 (11:45 +0900)
committerSeungbae Shin <seungbae.shin@samsung.com>
Fri, 23 Feb 2018 07:34:48 +0000 (16:34 +0900)
[Version] 0.12.8
[Issue Type] Enhancement

Change-Id: Ieefd933534c94d4af36678cd78d05fe8659fb7bb
Signed-off-by: Sangchul Lee <sc11.lee@samsung.com>
packaging/focus-server.service
packaging/libmm-sound.spec
packaging/org.tizen.SoundServer.service
packaging/sound-server.service [new file with mode: 0644]

index d11f4c1..9914d2d 100644 (file)
@@ -9,6 +9,8 @@ MemoryLimit=50M
 User=multimedia_fw
 Group=multimedia_fw
 SmackProcessLabel=System
+SecureBits=keep-caps
+Capabilities=cap_fowner,cap_lease=i
 
 [Install]
 WantedBy=tizen-system.target
index 772bfe6..0afbbb6 100644 (file)
@@ -1,10 +1,11 @@
 Name:       libmm-sound
 Summary:    MMSound Package contains client lib and sound_server binary
-Version:    0.12.7
+Version:    0.12.8
 Release:    0
 Group:      System/Libraries
 License:    Apache-2.0
 Source0:    %{name}-%{version}.tar.gz
+Source2:    sound-server.service
 Source3:    sound-server.conf
 Source4:    focus-server.service
 Source5:    focus-server.path
@@ -99,6 +100,7 @@ install -d %{buildroot}%{_unitdir}/sysinit.target.wants
 %else
 install -d %{buildroot}%{_unitdir}/multi-user.target.wants
 %endif
+install -m0644 %{SOURCE2} %{buildroot}%{_unitdir}/
 install -m0644 %{SOURCE4} %{buildroot}%{_unitdir}/
 install -m0644 %{SOURCE5} %{buildroot}%{_unitdir}/
 %if "%{?TIZEN_PRODUCT_TV}" == "1"
@@ -139,6 +141,7 @@ ln -sf ../focus-server.path %{buildroot}%{_unitdir}/multi-user.target.wants/focu
 /etc/dbus-1/system.d/sound-server.conf
 /etc/dbus-1/system.d/focus-server.conf
 %{_datadir}/dbus-1/system-services/org.tizen.SoundServer.service
+%{_unitdir}/sound-server.service
 
 %files devel
 %defattr(-,root,root,-)
index 0d3a64f..d23afd9 100644 (file)
@@ -1,5 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.SoundServer
-Exec=/usr/bin/sound_server -S
-User=multimedia_fw
-Group=multimedia_fw
+Exec=/bin/false
+SystemdService=sound-server.service
diff --git a/packaging/sound-server.service b/packaging/sound-server.service
new file mode 100644 (file)
index 0000000..143a809
--- /dev/null
@@ -0,0 +1,14 @@
+[Unit]
+Description=Start the sound-server
+
+[Service]
+ExecStart=/usr/bin/sound_server -S
+Restart=no
+RestartSec=0
+MemoryLimit=50M
+User=multimedia_fw
+Group=multimedia_fw
+SmackProcessLabel=System
+SecureBits=keep-caps
+Capabilities=cap_lease=i
+