From 9afcd97e50f16bc489015ac6b4cd669e75434b2b Mon Sep 17 00:00:00 2001 From: Kunhoon Baik Date: Thu, 1 Sep 2016 22:39:20 +0900 Subject: Bind 2.4 apps directory to user app directory for compatibility Change-Id: Ieb817310c970b9fd40249f583421d2862cd1c908 --- src/systemd-user-helper/systemd-user-helper.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/systemd-user-helper/systemd-user-helper.c b/src/systemd-user-helper/systemd-user-helper.c index f6911d6..2012e9d 100644 --- a/src/systemd-user-helper/systemd-user-helper.c +++ b/src/systemd-user-helper/systemd-user-helper.c @@ -26,7 +26,9 @@ #include +// 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; } -- cgit v1.2.3