Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6
[firefly-linux-kernel-4.4.55.git] / fs / binfmt_misc.c
index 70789e198dea9249e1ad3388a25ba209769acb12..c04ef1d4f18a573726f83d7f5a1401f06ec9652b 100644 (file)
@@ -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)