From 2e2a3ce5f41a391ecf1c216366bf67ade6ed87b7 Mon Sep 17 00:00:00 2001 From: Chengwei Yang Date: Thu, 17 Oct 2013 16:53:56 +0800 Subject: [PATCH] Fix .service and install it into dbus system service directory 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 --- packaging/smartcard-service.spec | 2 +- server/CMakeLists.txt | 2 +- server/org.tizen.smartcard_service.service | 1 + 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/packaging/smartcard-service.spec b/packaging/smartcard-service.spec index c9866a0..69fda69 100644 --- a/packaging/smartcard-service.spec +++ b/packaging/smartcard-service.spec @@ -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 diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index e84676b..c3c26d1 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -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) diff --git a/server/org.tizen.smartcard_service.service b/server/org.tizen.smartcard_service.service index 8b75c5e..d909599 100644 --- a/server/org.tizen.smartcard_service.service +++ b/server/org.tizen.smartcard_service.service @@ -1,3 +1,4 @@ [D-BUS Service] Name=org.tizen.SmartcardService Exec=/usr/bin/smartcard-daemon +User=root -- 2.7.4