From: Hyuk Lee Date: Mon, 12 Feb 2018 01:10:01 +0000 (+0900) Subject: Modify the UID/GID to network_fw X-Git-Tag: accepted/tizen/unified/20180226.142337^0 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=9eea4423f00cd3007f94cf93e0e8f350a3bee5d1;p=platform%2Fupstream%2Fbluez.git Modify the UID/GID to network_fw Change-Id: Ie523965c1ef3fcc54c321dbccce3811ed6f2fa31 Signed-off-by: Hyuk Lee --- diff --git a/packaging/bluez.spec b/packaging/bluez.spec index c5b1169..6170a60 100755 --- a/packaging/bluez.spec +++ b/packaging/bluez.spec @@ -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 diff --git a/src/bluetooth.service.in b/src/bluetooth.service.in index 98b8064..a35ae4e 100755 --- a/src/bluetooth.service.in +++ b/src/bluetooth.service.in @@ -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 diff --git a/src/org.bluez.service b/src/org.bluez.service index dd7ae8f..2a3b057 100755 --- a/src/org.bluez.service +++ b/src/org.bluez.service @@ -2,4 +2,4 @@ Name=org.bluez Exec=/bin/false User=root -SystemdService=dbus-org.bluez.service +SystemdService=bluetooth.service