diff options
author | Hwankyu Jhun <h.jhun@samsung.com> | 2021-02-08 16:59:21 +0900 |
---|---|---|
committer | Hwankyu Jhun <h.jhun@samsung.com> | 2021-02-08 16:59:21 +0900 |
commit | 55222aa020e669a37d25eda84dc4620c75f738ba (patch) | |
tree | f9c5f803118f9ec4e1c6abffb9516b4d868e9936 | |
parent | 747287c1bd1e6496b7ea805144f6a96287109826 (diff) | |
download | launchpad-55222aa020e669a37d25eda84dc4620c75f738ba.tar.gz launchpad-55222aa020e669a37d25eda84dc4620c75f738ba.tar.bz2 launchpad-55222aa020e669a37d25eda84dc4620c75f738ba.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.c | 16 |
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) { |