#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_robot.conf %{buildroot}%{_sysconfdir}/dbus-1/system.d/bluetooth_robot.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
#%{_sysconfdir}/bluetooth/audio.conf
#%{_sysconfdir}/bluetooth/network.conf
#%{_sysconfdir}/bluetooth/rfcomm.conf
-%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
#%{_datadir}/man/*/*
%attr(750, network_fw, network_fw)%{_bindir}/hcitool
%{_bindir}/l2ping
%files profile_wearable
%manifest %{name}.manifest
%{_sysconfdir}/bluetooth/main.conf.wearable
+%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%files profile_tv
%manifest %{name}.manifest
%{_sysconfdir}/bluetooth/main.conf
%exclude %{_datadir}/dbus-1/system-services/org.bluez.service
+%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%files profile_common
%manifest %{name}.manifest
%{_sysconfdir}/bluetooth/main.conf
+%{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%post plugin-headless
ln -sf main.conf.headless %{_sysconfdir}/bluetooth/main.conf
%post plugin-robot
ln -sf main.conf.robot %{_sysconfdir}/bluetooth/main.conf
+mv %{_sysconfdir}/dbus-1/system.d/bluetooth_robot.conf %{_sysconfdir}/dbus-1/system.d/bluetooth.conf
%preun plugin-robot
rm %{_sysconfdir}/bluetooth/main.conf
%files plugin-robot
%manifest %{name}.manifest
%{_sysconfdir}/bluetooth/main.conf.robot
+%{_sysconfdir}/dbus-1/system.d/bluetooth_robot.conf
+
%changelog
--- /dev/null
+<!DOCTYPE busconfig PUBLIC "-//freedesktop//DTD D-BUS Bus Configuration 1.0//EN"
+ "http://www.freedesktop.org/standards/dbus/1.0/busconfig.dtd">
+<busconfig>
+ <!-- ../system.conf have denied everything, so we just punch some holes -->
+ <policy user="root">
+ <allow own="org.bluez.frwk_agent"/>
+ <allow send_destination="org.bluez.frwk_agent"/>
+ <allow own="org.bluez"/>
+ <allow send_destination="org.bluez"/>
+ </policy>
+ <!-- allow users of bt_use group (Tizen BT group) to
+ communicate with bluetoothd -->
+ <policy group="bt_use">
+ <allow send_destination="org.bluez.frwk_agent"/>
+ <allow send_destination="org.bluez"/>
+ </policy>
+ <!-- allow users of lp group (printing subsystem) to
+ communicate with bluetoothd -->
+ <policy group="lp">
+ <allow send_destination="org.bluez.frwk_agent"/>
+ <allow send_destination="org.bluez"/>
+ </policy>
+ <policy group="network_fw">
+ <allow own="org.bluez.frwk_agent"/>
+ <allow send_destination="org.bluez.frwk_agent"/>
+ <allow own="org.bluez"/>
+ <allow send_destination="org.bluez"/>
+ </policy>
+ <policy context="default">
+ <deny own="org.bluez"/>
+ <deny send_destination="org.bluez"/>
+ <deny own="org.bluez.frwk_agent"/>
+ <deny send_destination="org.bluez.frwk_agent"/>
+
+ <allow send_destination="org.bluez" send_interface="org.freedesktop.DBus.Properties" send_member="Get"/>
+ <allow send_destination="org.bluez" send_interface="org.freedesktop.DBus.Properties" send_member="GetAll"/>
+ <allow send_destination="org.bluez" send_interface="org.freedesktop.DBus.ObjectManager" send_member="DefaultAdapter"/>
+ <allow send_destination="org.bluez" send_interface="org.freedesktop.DBus.ObjectManager" send_member="GetManagedObjects"/>
+
+ <check send_destination="org.bluez" send_interface="org.bluez.Adapter1" send_member="CreateDevice" privilege="http://tizen.org/privilege/bluetooth"/>
+
+ <allow send_destination="org.bluez" send_interface="org.bluez.Device1" send_member="DiscoverServices"/>
+ <check send_destination="org.bluez" send_interface="org.bluez.Device1" send_member="ConnectProfile" privilege="http://tizen.org/privilege/bluetooth"/>
+ <check send_destination="org.bluez" send_interface="org.bluez.Device1" send_member="DisconnectProfile" privilege="http://tizen.org/privilege/bluetooth"/>
+ <check send_destination="org.bluez" send_interface="org.bluez.Device1" send_member="DisconnectExtProfile" privilege="http://tizen.org/privilege/bluetooth"/>
+ <check send_destination="org.bluez" send_interface="org.bluez.Device1" send_member="CancelDiscovery" privilege="http://tizen.org/privilege/bluetooth"/>
+
+ <allow send_destination="org.bluez" send_interface="org.bluez.GattManager1" send_member="GetService"/>
+ <check send_destination="org.bluez" send_interface="org.bluez.GattManager1" send_member="RegisterApplication" privilege="http://tizen.org/privilege/bluetooth"/>
+ <check send_destination="org.bluez" send_interface="org.bluez.GattManager1" send_member="UnregisterApplication" privilege="http://tizen.org/privilege/bluetooth"/>
+
+ <allow send_destination="org.bluez" send_interface="org.bluez.ProfileManager1" send_member="RegisterProfile"/>
+ <allow send_destination="org.bluez" send_interface="org.bluez.ProfileManager1" send_member="RegisterProfile1"/>
+ <allow send_destination="org.bluez" send_interface="org.bluez.ProfileManager1" send_member="RegisterProfile2"/>
+ <allow send_destination="org.bluez" send_interface="org.bluez.ProfileManager1" send_member="UnregisterProfile"/>
+
+ <check send_destination="org.bluez" send_interface="org.bluez.Input1" send_member="GetFD" privilege="http://tizen.org/privilege/bluetooth"/>
+ </policy>
+</busconfig>