Check installed storage before executable file check 76/253276/1
authorHwankyu Jhun <h.jhun@samsung.com>
Mon, 8 Feb 2021 07:59:21 +0000 (16:59 +0900)
committerHwankyu Jhun <h.jhun@samsung.com>
Mon, 8 Feb 2021 07:59:21 +0000 (16:59 +0900)
If the installed storage is "external", launchpad doesn't check an
executable file.

Change-Id: Iae735ee816978006321ec376e52465fd89e4c647
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/launchpad-process-pool/src/launchpad.c

index 78399c9..c2db5ec 100644 (file)
@@ -2116,6 +2116,7 @@ static bool __handle_launch_event(int fd, io_condition_e cond, void *data)
        appinfo_t *menu_info = NULL;
        candidate_process_context_t *cpc = NULL;
        candidate_process_context_t *org_cpc = NULL;
+       const char *installed_storage;
        const char *app_path = NULL;
        int pid = -1;
        int clifd = -1;
@@ -2224,12 +2225,15 @@ static bool __handle_launch_event(int fd, io_condition_e cond, void *data)
                goto end;
        }
 
-       if (access(app_path, X_OK) != 0) {
-               ret = -errno;
-               _E("%s is not executable. errno(%d)", app_path, errno);
-               __send_result_to_caller(clifd, ret);
-               clifd = -1;
-               goto end;
+       installed_storage = bundle_get_val(kb, AUL_K_INSTALLED_STORAGE);
+       if (!installed_storage || strcmp(installed_storage, "external") != 0) {
+               if (access(app_path, X_OK) != 0) {
+                       ret = -errno;
+                       _E("%s is not executable. errno(%d)", app_path, errno);
+                       __send_result_to_caller(clifd, ret);
+                       clifd = -1;
+                       goto end;
+               }
        }
 
        if (menu_info->hwacc == NULL) {