Fix .service and install it into dbus system service directory
authorChengwei Yang <chengwei.yang@intel.com>
Thu, 17 Oct 2013 10:06:37 +0000 (18:06 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Thu, 17 Oct 2013 10:06:37 +0000 (18:06 +0800)
In Tizen 3.0, dbus will running with an unprivileged user 'dbus' and use
an setuid servicehelper to activate system service, which should be
installed into the system-service directory if it provides system wide
service, and "User=" field is must to have to servicehelper.

Bug: https://bugs.tizen.org/jira/browse/PTREL-124
Change-Id: I4e8a3f14b4c639ac01fb7631dbf39a8ca02b78e9
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
daemon/CMakeLists.txt
daemon/org.tizen.NetNfcService.service
packaging/nfc-manager.spec

index 2e32b15..997ed12 100755 (executable)
@@ -26,6 +26,6 @@ TARGET_LINK_LIBRARIES(${NFC_DAEMON} ${daemon_pkgs_LDFLAGS} pthread dl rt nfc-com
 
 INSTALL(TARGETS ${NFC_DAEMON} DESTINATION bin)
 
-INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.NetNfcService.service DESTINATION share/dbus-1/services)
+INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/org.tizen.NetNfcService.service DESTINATION share/dbus-1/system-services)
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/nfc-manager.xml DESTINATION share/packages)
 INSTALL(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/sounds DESTINATION share/nfc-manager-daemon)
index a94b24f..ae98f33 100644 (file)
@@ -1,3 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.NetNfcService
 Exec=/usr/bin/nfc-manager-daemon
+User=root
index 5e2a495..e8bc7fe 100755 (executable)
@@ -137,7 +137,7 @@ systemctl daemon-reload
 #%%{_bindir}/ndef-tool
 %{_libdir}/systemd/system/%{name}.service
 %{_libdir}/systemd/system/multi-user.target.wants/%{name}.service
-%{_datadir}/dbus-1/services/org.tizen.NetNfcService.service
+%{_datadir}/dbus-1/system-services/org.tizen.NetNfcService.service
 %{_datadir}/packages/%{name}.xml
 %{_datadir}/nfc-manager-daemon/sounds/*
 %attr(0775,-,5000) %dir /opt/usr/share/nfc_debug