X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=fs%2Fbinfmt_misc.c;h=7191306367c5d11912ceed01c5fce4925b528eba;hb=3a2e7f47;hp=dbf0ac0523de14d49edcc58b43ab7c62a407e406;hpb=77a50df2b14c8d3ee3c58c21c4a0e0157570df09;p=linux-2.6 diff --git a/fs/binfmt_misc.c b/fs/binfmt_misc.c index dbf0ac0523..7191306367 100644 --- a/fs/binfmt_misc.c +++ b/fs/binfmt_misc.c @@ -115,6 +115,12 @@ static int load_misc_binary(struct linux_binprm *bprm, struct pt_regs *regs) if (!enabled) goto _ret; + retval = -ENOEXEC; + if (bprm->misc_bang) + goto _ret; + + bprm->misc_bang = 1; + /* to keep locking time low, we copy the interpreter string */ read_lock(&entries_lock); fmt = check_file(bprm);