Date: Wed, 23 Apr 1997 13:13:41 +0400 (MSD) From: =?KOI8-R?B?4c7E0sXKIP7F0s7P1w==?= <ache@nagual.pp.ru> To: David Greenman <dg@root.com> Cc: current@freebsd.org Subject: Re: Recent vfork kernel changes broke csh & tcsh! Message-ID: <Pine.BSF.3.96.970423131129.256A-100000@nagual.pp.ru> In-Reply-To: <199704230614.XAA01914@root.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Tue, 22 Apr 1997, David Greenman wrote:
> I don't recall seeing Tor's suggested change. I've looked at various ways
> of doing this differently in the past and didn't like any of the solutions
> I thought up. I'll try to keep an open mind, however.
He forget Cc to current@, here it is:
Just add another field in struct image_params, called e.g. argv0,
initially set it to NULL in execve, and change code in
exec_extract_strings from
while ((argp = (caddr_t) fuword(argv++))) {
....
}
to
argp = (caddr_t) fuword(argv++);
if (imgp->argv0)
argp = imgp->argv0;
if (argp) {
do {
....
} while ((argp = (caddr_t) fuword(argv++)));
}
copying the whole argv is an excessive modification.
Then imgact_shell can set imgp->argv0 to the file name instead of
writing to memory areas that are 'const' according to the execve
prototype.
- Tor Egge
--
Andrey A. Chernov
<ache@null.net>
http://www.nagual.pp.ru/~ache/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSF.3.96.970423131129.256A-100000>
