From owner-cvs-all Mon Jun 21 16:28:34 1999 Delivered-To: cvs-all@freebsd.org Received: from smtp11.bellglobal.com (smtp11.bellglobal.com [204.101.251.53]) by hub.freebsd.org (Postfix) with ESMTP id C8111151BE; Mon, 21 Jun 1999 16:28:28 -0700 (PDT) (envelope-from vanderh@ecf.toronto.edu) Received: from localhost.nowhere (ppp18373.on.bellglobal.com [206.172.130.53]) by smtp11.bellglobal.com (8.8.5/8.8.5) with ESMTP id TAA01416; Mon, 21 Jun 1999 19:31:23 -0400 (EDT) Received: (from tim@localhost) by localhost.nowhere (8.9.3/8.9.1) id TAA09808; Mon, 21 Jun 1999 19:28:23 -0400 (EDT) (envelope-from tim) Date: Mon, 21 Jun 1999 19:28:23 -0400 From: Tim Vanderhoek To: Jean-Marc Zucconi Cc: cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/sys/kern imgact_gzip.c Message-ID: <19990621192823.A9761@mad> References: <199906211623.JAA80719@freefall.freebsd.org> <199906212140.XAA00694@qix.jmz.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 0.95i In-Reply-To: <199906212140.XAA00694@qix.jmz.org>; from Jean-Marc Zucconi on Mon, Jun 21, 1999 at 11:40:01PM +0200 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk On Mon, Jun 21, 1999 at 11:40:01PM +0200, Jean-Marc Zucconi wrote: > > > 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 amount > > 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 No, only execution of gzip'd a.out files is supported. It wouldn't be too hard to switch that to "only execution of gzip'd elf files is supported", since the do_aout_hdr() is essentially carbon-copied from exec_aout_imgact() (and rather out-of-date, at that). Simply carbon-copying exec_elf_imgact() in place of the aout loader in imgact_gzip.c and making it dereference through the appropriate struct should do the trick. Certainly easy enough to do, but it would probably be preferable to convince imgact_gzip.c and kern_exec.c to treat gzipped executables similar to interpreted files --- ie. unzip them, then loop back and try each activator. As it is, because there are essentially two copies of exec_aout_imgact(), the one in imgact_gzip.c has gotten rather out-of-date. The latter suggestion is quite a lot more work than the former, however. In fact, if I think about it a little, I'm not sure it's even possible without a great deal of otherwise non-useful changes. If there are still people who actually want to use gzipped elf executables, I suppose it would be easy to add support for that, but those people had better speak up. :-) -- This is my .signature which gets appended to the end of my messages. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message