Modify the pid and gid of pbap agent to network_fw 39/132439/1 accepted/tizen/unified/20170613.194512 submit/tizen/20170613.061617
authorDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 5 Jun 2017 07:25:47 +0000 (16:25 +0900)
committerDoHyun Pyun <dh79.pyun@samsung.com>
Mon, 5 Jun 2017 07:25:47 +0000 (16:25 +0900)
Change-Id: I5ff0b5d2c4e014a484be495bc8ac5c786865028b
Signed-off-by: DoHyun Pyun <dh79.pyun@samsung.com>
map-agent/CMakeLists.txt
map-agent/bluetooth_map_agent.c
packaging/bluetooth-agent.spec
packaging/bluetooth-pbap-agent.service

index e58e60e..8b7ce48 100644 (file)
@@ -20,4 +20,4 @@ ADD_EXECUTABLE(${PROJECT_NAME} ${SRCS})
 TARGET_LINK_LIBRARIES(${PROJECT_NAME} ${pkgs_map_agent_LDFLAGS})
 
 INSTALL(TARGETS ${PROJECT_NAME} DESTINATION bin)
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.bluez.map_agent.service DESTINATION share/dbus-1/services)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.bluez.map_agent.service DESTINATION share/dbus-1/system-services)
index 77c61e7..5f59b9f 100644 (file)
@@ -378,7 +378,7 @@ static GDBusConnection *__bt_map_get_gdbus_connection(void)
        if (map_dbus_conn)
                return map_dbus_conn;
 
-       map_dbus_conn = g_bus_get_sync(G_BUS_TYPE_SESSION, NULL, &err);
+       map_dbus_conn = g_bus_get_sync(G_BUS_TYPE_SYSTEM, NULL, &err);
        if (!map_dbus_conn) {
                if (err) {
                        ERR("Unable to connect to dbus: %s", err->message);
@@ -1511,7 +1511,7 @@ static gboolean __bt_map_dbus_init(void)
                return FALSE;
        }
 
-       owner_id = g_bus_own_name(G_BUS_TYPE_SESSION,
+       owner_id = g_bus_own_name(G_BUS_TYPE_SYSTEM,
                        BT_MAP_SERVICE_NAME,
                        G_BUS_NAME_OWNER_FLAGS_NONE,
                        NULL, NULL, NULL,
index da3f618..7f8b779 100644 (file)
@@ -181,7 +181,7 @@ pushd common_build
 popd
 %endif
 
-install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/user/bluetooth-map-agent.service
+install -D -m 0644 packaging/bluetooth-map-agent.service %{buildroot}%{_libdir}/systemd/system/bluetooth-map-agent.service
 # This usage of profile macro does NOT conflict 4.0 configurability.
 %if "%{?profile}" != "mobile" && "%{?profile}" != "tv"
 # Original: wearable, ivi. Added: common, "undefined"
@@ -226,14 +226,14 @@ rm %{_bindir}/bluetooth-hf-agent
 %license LICENSE
 %{_bindir}/bluetooth-hf-agent
 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
-%exclude %{_libdir}/systemd/user/bluetooth-map-agent.service
+%exclude %{_libdir}/systemd/system/bluetooth-map-agent.service
 %exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
 
 %files profile_ivi
 %license LICENSE
 %{_bindir}/bluetooth-hf-agent.ivi
 %{_datadir}/dbus-1/system-services/org.bluez.hf_agent.service
-%exclude %{_libdir}/systemd/user/bluetooth-map-agent.service
+%exclude %{_libdir}/systemd/system/bluetooth-map-agent.service
 %exclude %{_libdir}/systemd/system/bluetooth-pbap-agent.service
 %endif
 
@@ -246,11 +246,11 @@ rm %{_bindir}/bluetooth-hf-agent
 %{_bindir}/bluetooth-map-agent
 %{_bindir}/bluetooth-pb-agent
 %{_datadir}/dbus-1/system-services/org.bluez.pb_agent.service
-%{_datadir}/dbus-1/services/org.bluez.map_agent.service
+%{_datadir}/dbus-1/system-services/org.bluez.map_agent.service
 %{_datadir}/dbus-1/system-services/org.bluez.ag_agent.service
 %attr(0666,-,-) /var/lib/bluetooth/voice-recognition-blacklist
 %{_sysconfdir}/dbus-1/system.d/bluetooth-ag-agent.conf
-%{_libdir}/systemd/user/bluetooth-map-agent.service
+%{_libdir}/systemd/system/bluetooth-map-agent.service
 %{_libdir}/systemd/system/bluetooth-pbap-agent.service
 %endif
 
index fe5578d..895ffd3 100644 (file)
@@ -2,10 +2,9 @@
 Description=Bluetooth PBAP Agent
 
 [Service]
-User=owner
-Group=users
+User=network_fw
+Group=network_fw
 SupplementaryGroups=priv_message_read
 Type=dbus
 BusName=org.bluez.pb_agent
-SmackProcessLabel=User
 ExecStart=/usr/bin/bluetooth-pb-agent