X-Git-Url: http://demsky.eecs.uci.edu/git/?a=blobdiff_plain;f=fs%2Fbinfmt_misc.c;h=c04ef1d4f18a573726f83d7f5a1401f06ec9652b;hb=a463e9c57ac1f21e40bc8bff77a4de082ebc432e;hp=70789e198dea9249e1ad3388a25ba209769acb12;hpb=bdeb03cada1c305346505c48e5b1dab37e9acc4e;p=firefly-linux-kernel-4.4.55.git diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index 70789e198dea..c04ef1d4f18a 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -144,6 +144,10 @@ static int load_misc_binary(struct linux_binprm *bprm) if (!fmt) goto ret; + /* Need to be able to load the file after exec */ + if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE) + return -ENOENT; + if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) { retval = remove_arg_zero(bprm); if (retval)