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 b144cb47e2a237b75092b208aabb55f7d3e88ae8..664bba630f9213a7b163978e9dadaacd4864a0a3 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 31bc35f1d8aa4a456cd859934439c341344cabdb..36216cda4502ca0bf71003d95f6d1ac2a4e00346 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 e36fad7ab4dc5ac0b51443953e2739ddea02f90e..1e3275ab9b2d4ac712df96c2b8467df7ff44523a 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-mount-external
+PathExists=/run/.ode-mount-external
index 4557e7f3d520f043abb7dc78df4f5f467ee7d206..41e941f2aa2843ef58e5a5966dcac203a024eb35 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-progress-internal@Decrypting
+PathExists=/run/.ode-progress-internal@Decrypting
index 0e58b8cb0f1c202000ea0b3af6d97476d5274ed8..a3b4dfaeabfae9024a93f253c38b4d5958c5cad7 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-progress-internal@Encrypting
+PathExists=/run/.ode-progress-internal@Encrypting
index fd36dfb84b0c0e2c16ba9740500dac9d95b406ee..a54f79f879ce5c92e9d643dd352d4dce09c0618c 100644 (file)
@@ -1,2 +1,2 @@
 [Path]
-PathExists=/tmp/.ode-umount-internal
+PathExists=/run/.ode-umount-internal