From f36019c9a930d80b769ab7431758064bd725702e Mon Sep 17 00:00:00 2001 From: Sungbae Yoo Date: Fri, 1 Sep 2017 18:06:43 +0900 Subject: [PATCH] Change the touch file path /tmp to /run 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 Change-Id: Id67ae73276967c99377e7d8a73421162aea14ea2 --- server/external-encryption.cpp | 4 ++-- server/internal-encryption.cpp | 4 ++-- server/systemd/ode-mount-external.path | 2 +- server/systemd/ode-progress-internal@Decrypting.path | 2 +- server/systemd/ode-progress-internal@Encrypting.path | 2 +- server/systemd/ode-umount-internal.path | 2 +- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/server/external-encryption.cpp b/server/external-encryption.cpp index b144cb4..664bba6 100644 --- a/server/external-encryption.cpp +++ b/server/external-encryption.cpp @@ -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) {} diff --git a/server/internal-encryption.cpp b/server/internal-encryption.cpp index 31bc35f..36216cd 100644 --- a/server/internal-encryption.cpp +++ b/server/internal-encryption.cpp @@ -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) {} diff --git a/server/systemd/ode-mount-external.path b/server/systemd/ode-mount-external.path index e36fad7..1e3275a 100644 --- a/server/systemd/ode-mount-external.path +++ b/server/systemd/ode-mount-external.path @@ -1,2 +1,2 @@ [Path] -PathExists=/tmp/.ode-mount-external +PathExists=/run/.ode-mount-external diff --git a/server/systemd/ode-progress-internal@Decrypting.path b/server/systemd/ode-progress-internal@Decrypting.path index 4557e7f..41e941f 100644 --- a/server/systemd/ode-progress-internal@Decrypting.path +++ b/server/systemd/ode-progress-internal@Decrypting.path @@ -1,2 +1,2 @@ [Path] -PathExists=/tmp/.ode-progress-internal@Decrypting +PathExists=/run/.ode-progress-internal@Decrypting diff --git a/server/systemd/ode-progress-internal@Encrypting.path b/server/systemd/ode-progress-internal@Encrypting.path index 0e58b8c..a3b4dfa 100644 --- a/server/systemd/ode-progress-internal@Encrypting.path +++ b/server/systemd/ode-progress-internal@Encrypting.path @@ -1,2 +1,2 @@ [Path] -PathExists=/tmp/.ode-progress-internal@Encrypting +PathExists=/run/.ode-progress-internal@Encrypting diff --git a/server/systemd/ode-umount-internal.path b/server/systemd/ode-umount-internal.path index fd36dfb..a54f79f 100644 --- a/server/systemd/ode-umount-internal.path +++ b/server/systemd/ode-umount-internal.path @@ -1,2 +1,2 @@ [Path] -PathExists=/tmp/.ode-umount-internal +PathExists=/run/.ode-umount-internal -- 2.7.4