summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorŁukasz Stelmach <l.stelmach@samsung.com>2022-12-01 00:20:16 +0100
committerŁukasz Stelmach <l.stelmach@samsung.com>2022-12-01 01:29:38 +0100
commit77388c82d90cf7ca21e3c1ee75ca9ef1cbfbeb1c (patch)
treef057f43115e6aa3340fe843ea2dd8d3d9b9fb9fd
parentad9ca05698797748ae7efabbd4ab21aad4faf953 (diff)
downloadbuild-77388c82d90cf7ca21e3c1ee75ca9ef1cbfbeb1c.tar.gz
build-77388c82d90cf7ca21e3c1ee75ca9ef1cbfbeb1c.tar.bz2
build-77388c82d90cf7ca21e3c1ee75ca9ef1cbfbeb1c.zip
Check for file existence instead of executability
Files under /proc/sys/fs/binfmt_misc are never executable. Change-Id: I05bd61a03f09d5bb150f97b0ffd4c49e49ebdd69 Signed-off-by: Łukasz Stelmach <l.stelmach@samsung.com>
-rw-r--r--initvm.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/initvm.c b/initvm.c
index ec973a5..b5f64cf 100644
--- a/initvm.c
+++ b/initvm.c
@@ -259,7 +259,7 @@ enum okfail binfmt_register(char *datafile, char *regfile)
int ret;
/* Is an interpreter for this arch already registered? */
snprintf(path, sizeof(path), SYSFS_BINFMT_MISC "/%s", f[name]);
- ret=access(path, X_OK);
+ ret=access(path, F_OK);
if (ret == 0) {
#ifdef DEBUG
fprintf(stderr,