service: modify emul-setup-audio-volume service 48/137448/1
authorSooyoung Ha <yoosah.ha@samsung.com>
Thu, 6 Jul 2017 02:54:55 +0000 (11:54 +0900)
committerSooyoung Ha <yoosah.ha@samsung.com>
Thu, 6 Jul 2017 03:01:06 +0000 (12:01 +0900)
This service file uses amixer and amixer uses /dev/snd device.
The /dev/snd device has 'audio' gid. If this service file gains audio
group permission, it will be able to excute amixer binary.
systemd-udevd.service modifies the gid of /dev/snd to audio, so 'After'
contents also modified.

Change-Id: Ie639d0115b843568af3f97da6944f38d0f4d7cf4
Signed-off-by: Sooyoung Ha <yoosah.ha@samsung.com>
filesystem/usr/lib/systemd/system/emul-setup-audio-volume.service

index 31ec4a6..ff633b0 100644 (file)
@@ -1,14 +1,15 @@
 [Unit]
 Description=Audio volume setup on emulator
 DefaultDependencies=no
+After=systemd-udevd.service
 
 [Service]
 User=service_fw
 Group=service_fw
-Capabilities=cap_dac_override=i
 SecureBits=keep-caps
 Type=oneshot
 SmackProcessLabel=System
+SupplementaryGroups=audio
 ExecStart=/usr/bin/amixer "cset" "name='Master Playback Switch'" "1"
 ExecStart=/usr/bin/amixer "cset" "name='Master Playback Volume'" "50"
 ExecStart=/usr/bin/amixer "cset" "name='PCM Playback Switch'" "1"