Modify the UID/GID to network_fw 56/169856/4 accepted/tizen/unified/20180226.142337 submit/tizen/20180219.022158 submit/tizen/20180221.011521 submit/tizen/20180226.020205
authorHyuk Lee <hyuk0512.lee@samsung.com>
Mon, 12 Feb 2018 01:10:01 +0000 (10:10 +0900)
committerHyuk Lee <hyuk0512.lee@samsung.com>
Mon, 19 Feb 2018 02:15:03 +0000 (11:15 +0900)
Change-Id: Ie523965c1ef3fcc54c321dbccce3811ed6f2fa31
Signed-off-by: Hyuk Lee <hyuk0512.lee@samsung.com>
packaging/bluez.spec
src/bluetooth.service.in
src/org.bluez.service

index c5b1169..6170a60 100755 (executable)
@@ -351,8 +351,9 @@ install --mode 0755 -d $RPM_BUILD_ROOT/var/lib/bluetooth
 install -D -m 0644 src/main_w.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf.wearable
 install -D -m 0644 src/main_m.conf %{buildroot}%{_sysconfdir}/bluetooth/main.conf
 
+install -D -m 0644 src/org.bluez.service %{buildroot}%{_datadir}/dbus-1/system-services/org.bluez.service
 
-#install -D -m 0644 src/bluetooth.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
+install -D -m 0644 src/bluetooth.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
 #install -D -m 0644 profiles/audio/audio.conf %{buildroot}%{_sysconfdir}/bluetooth/audio.conf
 #install -D -m 0644 profiles/network/network.conf %{buildroot}%{_sysconfdir}/bluetooth/network.conf
 
@@ -384,6 +385,9 @@ ln -sf ../bluetooth.service %{buildroot}%{_libpath}/systemd/system/multi-user.ta
 mkdir -p %{buildroot}%{upgrade_script_path}
 cp -f packaging/500.bluez_upgrade.sh %{buildroot}%{upgrade_script_path}
 
+%post
+ln -sf %{_libdir}/systemd/system/bluetooth.service %{_sysconfdir}/systemd/default-extra-dependencies/ignore-units.d/
+
 %post -n libbluetooth -p /sbin/ldconfig
 
 %postun -n libbluetooth -p /sbin/ldconfig
@@ -407,7 +411,7 @@ popd
 #%{_sysconfdir}/bluetooth/audio.conf
 #%{_sysconfdir}/bluetooth/network.conf
 #%{_sysconfdir}/bluetooth/rfcomm.conf
-#%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
+%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
 #%{_datadir}/man/*/*
 %{_bindir}/hcitool
 %{_bindir}/l2ping
@@ -418,9 +422,9 @@ popd
 %{_bindir}/sdptool
 %{_bindir}/ciptool
 #%{_bindir}/dfutool
-%{_bindir}/hciattach
-%{_bindir}/hciconfig
-%{_libexecdir}/bluetooth/bluetoothd
+%attr(755, network_fw, network_fw)%{_bindir}/hciattach
+%attr(755, network_fw, network_fw)%{_bindir}/hciconfig
+%attr(755, network_fw, network_fw)%{_libexecdir}/bluetooth/bluetoothd
 %exclude %{_libexecdir}/bluetooth/bluetoothd.bredr
 %exclude %{_libexecdir}/bluetooth/bluetoothd.le
 %{_bindir}/bccmd
@@ -514,5 +518,9 @@ rm %{_sysconfdir}/bluetooth/main.conf
 %files profile_common
 %manifest %{name}.manifest
 %{_sysconfdir}/bluetooth/main.conf
+%{_libpath}/systemd/system/bluetooth.service
+%{_libpath}/systemd/system/multi-user.target.wants/bluetooth.service
+%{_datadir}/dbus-1/system-services/org.bluez.service
+
 
 %changelog
index 98b8064..a35ae4e 100755 (executable)
@@ -1,17 +1,18 @@
 [Unit]
 Description=Bluetooth service
 Documentation=man:bluetoothd(8)
-DefaultDependencies=no
+After=multi-user.target
 
 [Service]
+User=network_fw
+Group=network_fw
 Type=dbus
 BusName=org.bluez
 ExecStart=/usr/libexec/bluetooth/bluetoothd -d -C
-CapabilityBoundingSet=CAP_NET_ADMIN CAP_NET_BIND_SERVICE
-LimitNPROC=1
+Capabilities=cap_net_admin,cap_net_bind_service,cap_dac_override=eip
+SecureBits=keep-caps
 SmackProcessLabel=System
-Restart=on-failure
+KillMode=process
 
 [Install]
 WantedBy=multi-user.target
-Alias=dbus-org.bluez.service
index dd7ae8f..2a3b057 100755 (executable)
@@ -2,4 +2,4 @@
 Name=org.bluez
 Exec=/bin/false
 User=root
-SystemdService=dbus-org.bluez.service
+SystemdService=bluetooth.service