Change the touch file path /tmp to /run 97/147197/1
authorSungbae Yoo <sungbae.yoo@samsung.com>
Fri, 1 Sep 2017 09:06:43 +0000 (18:06 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Fri, 1 Sep 2017 10:05:44 +0000 (19:05 +0900)
This commit enforces secyrity of scaffolding codes such as ode-*.path and
iode-*.service, which have to be transfered to storaged.

Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Change-Id: Id67ae73276967c99377e7d8a73421162aea14ea2

server/external-encryption.cpp
server/internal-encryption.cpp
server/systemd/ode-mount-external.path
server/systemd/ode-progress-internal@Decrypting.path
server/systemd/ode-progress-internal@Encrypting.path
server/systemd/ode-umount-internal.path

index b144cb4..664bba6 100644 (file)
@@ -272,7 +272,7 @@ int ExternalEncryption::mount()
        mountKey.clear();
 
        //For smackfsroot, smackfsdef option without CAP_MAC_ADMIN
-       runtime::File fileToTouch("/tmp/.ode-mount-external");
+       runtime::File fileToTouch("/run/.ode-mount-external");
        try {
                fileToTouch.remove();
        } catch(runtime::Exception &e) {}
@@ -330,7 +330,7 @@ int ExternalEncryption::encrypt(const std::string &password, unsigned int option
                        ::vconf_set_str(EXTERNAL_STATE_VCONF_KEY, "encrypted");
 
                        //For smackfsroot, smackfsdef option without CAP_MAC_ADMIN
-                       runtime::File fileToTouch("/tmp/.ode-mount-external");
+                       runtime::File fileToTouch("/run/.ode-mount-external");
                        try {
                                fileToTouch.remove();
                        } catch(runtime::Exception &e) {}
index 31bc35f..36216cd 100644 (file)
@@ -67,7 +67,7 @@ KeyManager::data mountKey;
 
 void stopDependedSystemdServices()
 {
-       runtime::File fileToTouch("/tmp/.ode-umount-internal");
+       runtime::File fileToTouch("/run/.ode-umount-internal");
        try {
                fileToTouch.remove();
        } catch(runtime::Exception &e) {}
@@ -89,7 +89,7 @@ void killDependedProcesses()
 }
 
 void showProgressUI(const std::string type) {
-       runtime::File fileToTouch("/tmp/.ode-progress-internal@" + type);
+       runtime::File fileToTouch("/run/.ode-progress-internal@" + type);
        try {
                fileToTouch.remove();
        } catch(runtime::Exception &e) {}
index e36fad7..1e3275a 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-mount-external
+PathExists=/run/.ode-mount-external
index 4557e7f..41e941f 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-progress-internal@Decrypting
+PathExists=/run/.ode-progress-internal@Decrypting
index 0e58b8c..a3b4dfa 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-progress-internal@Encrypting
+PathExists=/run/.ode-progress-internal@Encrypting
index fd36dfb..a54f79f 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-umount-internal
+PathExists=/run/.ode-umount-internal