Internal encryption: Fix missing elm config files and locales 32/114632/2 accepted/tizen/common/20170214.173822 accepted/tizen/ivi/20170215.085813 accepted/tizen/mobile/20170215.085658 accepted/tizen/tv/20170215.085735 accepted/tizen/wearable/20170215.085756 submit/tizen/20170214.101511
authorSungbae Yoo <sungbae.yoo@samsung.com>
Tue, 14 Feb 2017 08:32:19 +0000 (17:32 +0900)
committerSungbae Yoo <sungbae.yoo@samsung.com>
Tue, 14 Feb 2017 09:04:54 +0000 (01:04 -0800)
Signed-off-by: Sungbae Yoo <sungbae.yoo@samsung.com>
Change-Id: I388a157036d71014924773db9c5b98a3286ac2e3

server/internal-encryption.cpp
server/systemd/ode.service.in
tools/apps/ode/src/ode-app.c

index 4dbcf13..6a8a90a 100644 (file)
@@ -21,6 +21,7 @@
 #include <sys/reboot.h>
 
 #include <vconf.h>
+#include <tzplatform_config.h>
 #include <klay/process.h>
 #include <klay/file-user.h>
 #include <klay/filesystem.h>
@@ -91,6 +92,27 @@ void stopDependedSystemdServices()
 }
 
 void showProgressUI(const std::string type) {
+       ::tzplatform_set_user(::tzplatform_getuid(TZ_SYS_DEFAULT_USER));
+       std::string defaultUserHome(::tzplatform_getenv(TZ_USER_HOME));
+       ::tzplatform_reset_user();
+
+       ::tzplatform_set_user(::getuid());
+       std::string currentUserHome(::tzplatform_getenv(TZ_USER_HOME));
+       ::tzplatform_reset_user();
+
+       INFO("Home directory : " + currentUserHome);
+
+       runtime::File shareDirectory(currentUserHome + "/share");
+       if (!shareDirectory.exists()) {
+               shareDirectory.makeDirectory();
+       }
+
+       runtime::File elmConfigDir(currentUserHome + "/share/.elementary");
+       if (!elmConfigDir.exists()) {
+               runtime::File defaultElmConfigDir(defaultUserHome + "/share/.elementary");
+               defaultElmConfigDir.copyTo(shareDirectory.getPath());
+       }
+
        std::vector<std::string> args = {
                "ode", "progress", type, "Internal"
        };
index d9320ff..2080c19 100644 (file)
@@ -10,7 +10,6 @@ Restart=on-failure
 ExecReload=/bin/kill -HUP $MAINPID
 CapabilityBoundingSet=~CAP_MAC_ADMIN
 CapabilityBoundingSet=~CAP_MAC_OVERRIDE
-CapabilityBoundingSet=~CAP_DAC_OVERRIDE
 EnvironmentFile=/run/tizen-system-env
 EnvironmentFile=/run/xdg-root-env
 
index 263b4d0..7beebe9 100755 (executable)
@@ -270,8 +270,14 @@ int standalone_main(int argc, char *argv[])
                return EXIT_FAILURE;
        }
 
+       char *lang = vconf_get_str(VCONFKEY_LANGSET);
+       setlocale(LC_ALL, lang);
+       if (lang) {
+               free(lang);
+       }
+       bindtextdomain("ode", "/usr/apps/org.tizen.ode/res/locale");
+
        elm_init(argc, argv);
-       ui_app_lang_changed(NULL, NULL);
        create_base_window();
 
        if (!strncmp(argv[1], "progress", sizeof("progress"))) {