Change network_fw uid/gid from root for bluetooth-hci-up/down.service 38/192638/2
authorWootak Jung <wootak.jung@samsung.com>
Wed, 7 Nov 2018 08:05:01 +0000 (17:05 +0900)
committerWootak Jung <wootak.jung@samsung.com>
Thu, 8 Nov 2018 00:14:11 +0000 (09:14 +0900)
For using hciconfig, service file needs CAP_NET_ADMIN capability as network_fw.

Change-Id: I9f66aed472dcd77b6d70b39a75d8b9be8def07dc

packaging/bluetooth-hci-down.service
packaging/bluetooth-hci-up.service

index 59f3ed9..e8aa8f5 100644 (file)
@@ -2,5 +2,10 @@
 Description=Bluetooth hci down
 
 [Service]
+User=network_fw
+Group=network_fw
+SmackProcessLabel=System
 Type=oneshot
+Capabilities=cap_net_admin=i
+SecureBits=keep-caps
 ExecStart=/usr/bin/hciconfig hci0 down
index cc09077..45aeb23 100644 (file)
@@ -2,5 +2,10 @@
 Description=Bluetooth hci up
 
 [Service]
+User=network_fw
+Group=network_fw
+SmackProcessLabel=System
 Type=oneshot
+Capabilities=cap_net_admin=i
+SecureBits=keep-caps
 ExecStart=/usr/bin/hciconfig hci0 up