Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 21 Jun 1999 19:28:23 -0400
From:      Tim Vanderhoek <vanderh@ecf.utoronto.ca>
To:        Jean-Marc Zucconi <jmz@FreeBSD.ORG>
Cc:        cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG
Subject:   Re: cvs commit: src/sys/kern imgact_gzip.c
Message-ID:  <19990621192823.A9761@mad>
In-Reply-To: <199906212140.XAA00694@qix.jmz.org>; from Jean-Marc Zucconi on Mon, Jun 21, 1999 at 11:40:01PM %2B0200
References:  <199906211623.JAA80719@freefall.freebsd.org> <199906212140.XAA00694@qix.jmz.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990621192823.A9761>