diff options
Diffstat (limited to 'fs/binfmt_misc.c')
-rw-r--r-- | fs/binfmt_misc.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) | |||
144 | if (!fmt) | 144 | if (!fmt) |
145 | goto ret; | 145 | goto ret; |
146 | 146 | ||
147 | /* Need to be able to load the file after exec */ | ||
148 | if (bprm->interp_flags & BINPRM_FLAGS_PATH_INACCESSIBLE) | ||
149 | return -ENOENT; | ||
150 | |||
147 | if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) { | 151 | if (!(fmt->flags & MISC_FMT_PRESERVE_ARGV0)) { |
148 | retval = remove_arg_zero(bprm); | 152 | retval = remove_arg_zero(bprm); |
149 | if (retval) | 153 | if (retval) |