Change askuser to non-root daemon. 60/109960/1
authorjin-gyu.kim <jin-gyu.kim@samsung.com>
Wed, 4 Jan 2017 05:36:12 +0000 (14:36 +0900)
committerDariusz Michaluk <d.michaluk@samsung.com>
Thu, 12 Jan 2017 08:31:34 +0000 (09:31 +0100)
- Use '/run/user_ext' for askuser-notification.socket
- Set uid and gid for askuser service.

Change-Id: If709f1e5d5e20e9a3863bed6ee54a12b23d074a7

src/common/config/Path.cpp
systemd/askuser-notification.socket
systemd/askuser.service

index c6f6869..fece8df 100644 (file)
@@ -32,7 +32,7 @@ const std::string &getSocketPath() {
     return socketPath;
 }
 
-const std::string userPathFormatPrefix = "/run/user/";
+const std::string userPathFormatPrefix = "/run/user_ext/";
 const std::string userPathFormatSuffix = "/askuser-notification.socket";
 
 std::string getUserSocketPath(uid_t uid) {
index 0df0696..194ab60 100644 (file)
@@ -1,8 +1,9 @@
 [Socket]
-ListenStream=/run/user/%U/askuser-notification.socket
+ListenStream=/run/user_ext/%U/askuser-notification.socket
 SocketMode=0770
 
 Service=askuser-notification.service
+ExecStartPost=/usr/bin/chmod 0666 /run/user_ext/%U/askuser-notification.socket
 
 [Install]
 WantedBy=sockets.target
index b3e863f..2e36470 100644 (file)
@@ -12,6 +12,8 @@ TimeoutStopSec=3
 Restart=always
 
 UMask=0000
+User=security_fw
+Group=security_fw
 
 #Environment="ASKUSER_LOG_LEVEL=LOG_DEBUG"