summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHwankyu Jhun <h.jhun@samsung.com>2021-02-08 16:59:21 +0900
committerHwankyu Jhun <h.jhun@samsung.com>2021-02-09 08:10:29 +0900
commit876fb0928040c98369682ae487d321caedba86ad (patch)
tree8609fe78c4ae258cce35a08e7908a7f962b95b8c
parent137281e4b05d222d07cd1cb919290ee9e6398532 (diff)
downloadlaunchpad-876fb0928040c98369682ae487d321caedba86ad.tar.gz
launchpad-876fb0928040c98369682ae487d321caedba86ad.tar.bz2
launchpad-876fb0928040c98369682ae487d321caedba86ad.zip
Check installed storage before executable file check
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>
-rw-r--r--src/launchpad-process-pool/src/launchpad.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/launchpad-process-pool/src/launchpad.c b/src/launchpad-process-pool/src/launchpad.c
index 78399c9..c2db5ec 100644
--- a/src/launchpad-process-pool/src/launchpad.c
+++ b/src/launchpad-process-pool/src/launchpad.c
@@ -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) {