Change user default home directory 90/77290/1 accepted/tizen/common/20160629.223354 accepted/tizen/ivi/20160630.003917 accepted/tizen/mobile/20160630.003934 accepted/tizen/tv/20160630.003848 accepted/tizen/wearable/20160630.003937 submit/tizen/20160629.095831
authorYunmi Ha <yunmi.ha@samsung.com>
Wed, 29 Jun 2016 08:10:06 +0000 (17:10 +0900)
committerYunmi Ha <yunmi.ha@samsung.com>
Wed, 29 Jun 2016 08:12:13 +0000 (17:12 +0900)
before: user default directory = /home
After: user default directory = $TZ_SYS_HOME$

Signed-off-by: Yunmi Ha <yunmi.ha@samsung.com>
Change-Id: I1e4900b8a97544f3eff12a71346a9fee21ffe304

configure.ac
packaging/gumd.spec
src/common/Makefile.am
src/common/gum-config.c [changed mode: 0644->0755]

index 3d3534e..2f36fde 100644 (file)
@@ -48,6 +48,10 @@ AC_CHECK_HEADERS([string.h])
 AC_CHECK_HEADERS([sys/xattr.h attr/xattr.h],[break])
 AC_CHECK_FUNCS(llistxattr lgetxattr lsetxattr)
 
+PKG_CHECK_MODULES(TZ_PLATFORM_CONFIG, libtzplatform-config)
+AC_SUBST(TZ_PLATFORM_CONFIG_CFLAGS)
+AC_SUBST(TZ_PLATFORM_CONFIG_LIBS)
+
 # Crypt library.
 AC_SEARCH_LIBS([crypt],[crypt], CRYPT_LIB="-l$ac_lib", CRYPT_LIB="")
 AC_SUBST(CRYPT_LIB)
index 943d6f7..751eaf7 100644 (file)
@@ -29,6 +29,7 @@ BuildRequires: pkgconfig(gobject-2.0)
 BuildRequires: pkgconfig(gio-2.0)
 BuildRequires: pkgconfig(gio-unix-2.0)
 BuildRequires: pkgconfig(gmodule-2.0)
+BuildRequires: pkgconfig(libtzplatform-config)
 Requires: tizen-platform-config
 
 %description
index 2695c11..b5d9723 100644 (file)
@@ -16,6 +16,7 @@ libgum_common_la_DEPENDENCIES = \
 libgum_common_la_LIBADD = \
     $(top_builddir)/src/common/dbus/libgum-dbus-glue.la \
     $(GUM_COMMON_LIBS) \
+    $(TZ_PLATFORM_CONFIG_LIBS) \
     $(NULL)
 
 gum_common_pubhdr = $(top_srcdir)/include/gum/common
old mode 100644 (file)
new mode 100755 (executable)
index 81e10bb..c604ffd
@@ -32,6 +32,8 @@
 #include <string.h>
 #include <errno.h>
 #include <ctype.h>
+#include <tzplatform_config.h>
+
 
 #include "config.h"
 #include "common/gum-config.h"
@@ -619,6 +621,8 @@ static void
 _gum_config_initialize (
         GumConfig *self)
 {
+    const gchar *home_path = tzplatform_getenv(TZ_SYS_HOME);
+
     gum_config_set_string (self, GUM_CONFIG_GENERAL_PASSWD_FILE,
                GUM_PASSWD_FILE);
     gum_config_set_string (self, GUM_CONFIG_GENERAL_SHADOW_FILE,
@@ -627,8 +631,13 @@ _gum_config_initialize (
             GUM_GROUP_FILE);
     gum_config_set_string (self, GUM_CONFIG_GENERAL_GSHADOW_FILE,
             GUM_GSHADOW_FILE);
-    gum_config_set_string (self, GUM_CONFIG_GENERAL_HOME_DIR_PREF,
-               GUM_HOME_DIR_PREFIX);
+
+    if (NULL != home_path)  {
+        gum_config_set_string (self, GUM_CONFIG_GENERAL_HOME_DIR_PREF, home_path);
+    } else  {
+        gum_config_set_string (self, GUM_CONFIG_GENERAL_HOME_DIR_PREF, GUM_HOME_DIR_PREFIX);
+    }
+
     gum_config_set_string (self, GUM_CONFIG_GENERAL_SHELL, GUM_SHELL);
     gum_config_set_string (self, GUM_CONFIG_GENERAL_SKEL_DIR, GUM_SKEL_DIR);