Fix .service and install it into dbus system service directory 68/11068/1
authorChengwei Yang <chengwei.yang@intel.com>
Thu, 17 Oct 2013 08:53:56 +0000 (16:53 +0800)
committerChengwei Yang <chengwei.yang@intel.com>
Thu, 17 Oct 2013 08:53:56 +0000 (16:53 +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: Ibff4a08e185e46033673cec48416f9f6866b04f3
Signed-off-by: Chengwei Yang <chengwei.yang@intel.com>
packaging/smartcard-service.spec
server/CMakeLists.txt
server/org.tizen.smartcard_service.service

index c9866a0..69fda69 100644 (file)
@@ -152,7 +152,7 @@ MAJORVER=`echo %{version} | awk 'BEGIN {FS="."}{print $1}'`
        %{_bindir}/smartcard-test-client
 %endif
 %if 0%{?use_autostart:1}
-       %{_datadir}/dbus-1/services/org.tizen.smartcard_service.service
+       %{_datadir}/dbus-1/system-services/org.tizen.smartcard_service.service
 %else
        %{_sysconfdir}/init.d/smartcard-service-server
 %endif
index e84676b..c3c26d1 100644 (file)
@@ -18,6 +18,6 @@ TARGET_LINK_LIBRARIES(${DAEMON} ${pkgs_server_LDFLAGS} ${COMMON_LIB} dl)
 
 INSTALL(TARGETS ${DAEMON} DESTINATION bin)
 IF("${USE_AUTOSTART}" STREQUAL "1")
-       INSTALL(FILES org.tizen.smartcard_service.service DESTINATION share/dbus-1/services)
+       INSTALL(FILES org.tizen.smartcard_service.service DESTINATION share/dbus-1/system-services)
 ENDIF()
 INSTALL(FILES ${CMAKE_CURRENT_SOURCE_DIR}/smartcard-service-server.xml DESTINATION share/packages)
index 8b75c5e..d909599 100644 (file)
@@ -1,3 +1,4 @@
 [D-BUS Service]
 Name=org.tizen.SmartcardService
 Exec=/usr/bin/smartcard-daemon
+User=root