If an executable file is not executable, AMD rejects the launch request.
Change-Id: I3b77c9b0b3141b86ba77281e995b0b96f2779bd4
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
{
const char *status;
const char *ignore;
+ const char *exec;
int enable;
int ret;
+ exec = _appinfo_get_value(ai, AIT_EXEC);
+ if (exec == NULL) {
+ _E("Failed to get executable file path");
+ return -ENOENT;
+ }
+
+ ret = access(exec, X_OK);
+ if (ret != 0) {
+ _E("%s is not executable. errno(%d)", exec, errno);
+ return -errno;
+ }
+
status = _appinfo_get_value(ai, AIT_STATUS);
if (status == NULL) {
_E("Failed to get status value");