Date: Tue, 22 Jun 1999 07:16:46 +0800 From: Peter Wemm <peter@netplex.com.au> To: Jean-Marc Zucconi <jmz@FreeBSD.ORG> Cc: hoek@FreeBSD.ORG, cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern imgact_gzip.c Message-ID: <19990621231649.336E375@overcee.netplex.com.au> In-Reply-To: Your message of "Mon, 21 Jun 1999 23:40:01 %2B0200." <199906212140.XAA00694@qix.jmz.org>
next in thread | previous in thread | raw e-mail | index | archive | help
Jean-Marc Zucconi wrote: > >>>>> Tim Vanderhoek writes: > > > hoek 1999/06/21 09:23:15 PDT > > Modified files: > > sys/kern imgact_gzip.c > > Log: > > Correctly return ENOEXEC for really short zipped files. The way this is > > done is less-than cute, but this whole file is suffering from some amoun t > > of bitrot. Execution of zipped files should probably be implemented in a > > manner similar to that of #!/interpreted files. > > Do this mean that it should be possible to run gzip'ed executables??? I > though it was not possible with ELF binaries. Even after this commit I > am unable to do it: > $ cp /bin/ls . > $ gzip ls > $ ./ls.gz > bash: ./ls.gz: cannot execute binary file > Output=32 Inflate_error=1 igz.error=8 error2=0 where=180 No, imgact_gzip has it's own a.out executable decoder hardwired into it and this can't be easily changed to support ELF without a LOT of work. I half wonder if it might be better to gzip -d the executable stream into some sort of anon backed vnode and then pass that back into the exec system. That way it would work for any supported format etc. Cheers, -Peter To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990621231649.336E375>