Bind 2.4 apps directory to user app directory for compatibility 11/86511/1 accepted/tizen/ivi/20160905.065617 accepted/tizen/mobile/20160905.065521 accepted/tizen/tv/20160905.065541 accepted/tizen/wearable/20160905.065600 submit/tizen/20160904.234158
authorKunhoon Baik <knhoon.baik@samsung.com>
Thu, 1 Sep 2016 13:39:20 +0000 (22:39 +0900)
committerKunhoon Baik <knhoon.baik@samsung.com>
Thu, 1 Sep 2016 13:39:20 +0000 (22:39 +0900)
Change-Id: Ieb817310c970b9fd40249f583421d2862cd1c908

src/systemd-user-helper/systemd-user-helper.c

index f6911d6..2012e9d 100644 (file)
@@ -26,7 +26,9 @@
 
 #include <tzplatform_config.h>
 
+// For compatibility, Using hard-coded path
 #define LEGACY_CONTENTS_DIR "/opt/usr/media"
+#define LEGACY_APPS_DIR "/opt/usr/apps"
 
 #define LAZYMOUNT_LIB "/usr/lib/liblazymount.so.0"
 #define CONTAINER_LIB "/usr/lib/security/pam_krate.so"
@@ -69,6 +71,14 @@ static int normal_user_postprocess(char *username)
                fprintf(stderr, "user content bind mount failed - %d\n",errno);
                return r;
        }
+
+       r = mount(tzplatform_getenv(TZ_USER_APP),
+                       LEGACY_APPS_DIR, NULL, MS_BIND, NULL);
+       if (r < 0) {
+               fprintf(stderr, "user app bind mount failed - %d\n",errno);
+               return r;
+       }
+
        return 0;
 }