Change of socket path to /run/user/<UID> 39/172039/3
authorTomasz Swierczek <t.swierczek@samsung.com>
Fri, 9 Mar 2018 06:18:26 +0000 (07:18 +0100)
committerTomasz Swierczek <t.swierczek@samsung.com>
Wed, 14 Mar 2018 07:30:56 +0000 (08:30 +0100)
/run/user is accessible to service daemons in Tizen platform.
This change is only for Tizen 5.0.

Change-Id: I32494b6e2c27dcf8dcbb7820debcd9341d505a9a

packaging/askuser-notification.spec
src/capi/test/privacy_privilege_manager_test.cpp
src/common/config/Path.cpp
src/ipc/config.cpp
systemd/askuser-notification-stream.socket

index cccd77f..2baa3f4 100644 (file)
@@ -124,6 +124,10 @@ systemctl daemon-reload
 %endif
 
 systemctl restart cynara.service
+if [ $1 = 2 ]; then
+    # update - workaround for ditry user-session service restart, only for platform development case
+    echo "WARNING: askuser-notification updated; to ensure system stability & proper operation, reboot your device"
+fi
 
 %preun
 
index a2c33f6..4187ddc 100644 (file)
@@ -191,7 +191,7 @@ void printAppHelp(const char *programName)
     printf("1. Run as a client (%s -c) to trigger popups in the askuser-notification daemon.\n", programName);
     printf("2. Run one part as a client (%s -c) and other one as a server (%s -s).\n",
            programName, programName);
-    printf("If you want to run this program as a root you need to create /var/run/user_ext/0 folder.\n");
+    printf("If you want to run this program as a root you need to create /run/user/0 folder.\n");
     printf("To run this program in context of some Tizen's application, type in the console:\n");
     printf("#echo <SMACK label of the application> > /proc/self/attr/current\n");
     printf("#su - <user name>\n\n");
@@ -705,7 +705,7 @@ int main(int argc, char **argv)
     }
     catch (const ConnectionException &e) {
         printf("Connection exception occured during initialization: %s, exiting.\n", e.what());
-        printf("Check if the /var/run/user_ext/%u directory exists.\n", geteuid());
+        printf("Check if the /run/user/%u directory exists.\n", geteuid());
         exit(EXIT_FAILURE);
     }
     catch (const std::exception &e) {
index fece8df..c6f6869 100644 (file)
@@ -32,7 +32,7 @@ const std::string &getSocketPath() {
     return socketPath;
 }
 
-const std::string userPathFormatPrefix = "/run/user_ext/";
+const std::string userPathFormatPrefix = "/run/user/";
 const std::string userPathFormatSuffix = "/askuser-notification.socket";
 
 std::string getUserSocketPath(uid_t uid) {
index e4f0465..580ab31 100644 (file)
@@ -21,7 +21,7 @@
 #include "config.h"
 
 namespace {
-const std::string USER_EXT_PATH("/run/user_ext/");
+const std::string USER_EXT_PATH("/run/user/");
 const std::string SOCKET_STREAM_NAME("/askuser-notification-stream.socket");
 const std::string SOCKET_DGRAM_NAME("/askuser-notification-datagram.socket");
 } // namespace anonymous
index 2e932e0..beb36f7 100644 (file)
@@ -1,5 +1,5 @@
 [Socket]
-ListenStream=/run/user_ext/%U/askuser-notification-stream.socket
+ListenStream=/run/user/%U/askuser-notification-stream.socket
 SocketMode=0777
 
 Service=askuser-notification.service